1; RUN: llc -mtriple=i686-unknown-linux-gnu %s -o - | FileCheck %s --check-prefix=CHECK32 --check-prefix=CHECK 2; RUN: llc -mtriple=x86_64-unknown-linux-gnu %s -o - | FileCheck %s --check-prefix=CHECK64 --check-prefix=CHECK 3 4define void @zero_optsize(i32* %p) optsize { 5entry: 6 store i32 0, i32* %p 7 ret void 8 9; CHECK-LABEL: zero_optsize: 10; CHECK: movl $0 11; CHECK: ret 12} 13 14define void @minus_one_optsize(i32* %p) optsize { 15entry: 16 store i32 -1, i32* %p 17 ret void 18 19; CHECK-LABEL: minus_one_optsize: 20; CHECK: movl $-1 21; CHECK: ret 22} 23 24 25define void @zero_64(i64* %p) minsize { 26entry: 27 store i64 0, i64* %p 28 ret void 29 30; CHECK-LABEL: zero_64: 31; CHECK32: andl $0 32; CHECK32: andl $0 33; CHECK64: andq $0 34; CHECK: ret 35} 36 37define void @zero_32(i32* %p) minsize { 38entry: 39 store i32 0, i32* %p 40 ret void 41 42; CHECK-LABEL: zero_32: 43; CHECK: andl $0 44; CHECK: ret 45} 46 47define void @zero_16(i16* %p) minsize { 48entry: 49 store i16 0, i16* %p 50 ret void 51 52; CHECK-LABEL: zero_16: 53; CHECK: andw $0 54; CHECK: ret 55} 56 57 58define void @minus_one_64(i64* %p) minsize { 59entry: 60 store i64 -1, i64* %p 61 ret void 62 63; CHECK-LABEL: minus_one_64: 64; CHECK32: orl $-1 65; CHECK32: orl $-1 66; CHECK64: orq $-1 67; CHECK: ret 68} 69 70define void @minus_one_32(i32* %p) minsize { 71entry: 72 store i32 -1, i32* %p 73 ret void 74 75; CHECK-LABEL: minus_one_32: 76; CHECK: orl $-1 77; CHECK: ret 78} 79 80define void @minus_one_16(i16* %p) minsize { 81entry: 82 store i16 -1, i16* %p 83 ret void 84 85; CHECK-LABEL: minus_one_16: 86; CHECK: orw $-1 87; CHECK: ret 88} 89