1 int and_0(int a) 2 { 3 return a && 0; 4 } 5 6 int and_1(int a) 7 { 8 return a && 1; 9 } 10 11 int or_0(int a) 12 { 13 return a || 0; 14 } 15 16 int or_1(int a) 17 { 18 return a || 1; 19 } 20 21 // try again but with something true but != 1 22 int and_2(int a) 23 { 24 return a && 2; 25 } 26 27 int or_2(int a) 28 { 29 return a || 2; 30 } 31 32 /* 33 * check-name: bool-simplify 34 * check-command: test-linearize -Wno-decl $file 35 * 36 * check-output-start 37 and_0: 38 .L0: 39 <entry-point> 40 ret.32 $0 41 42 43 and_1: 44 .L2: 45 <entry-point> 46 setne.32 %r9 <- %arg1, $0 47 ret.32 %r9 48 49 50 or_0: 51 .L4: 52 <entry-point> 53 setne.32 %r14 <- %arg1, $0 54 ret.32 %r14 55 56 57 or_1: 58 .L6: 59 <entry-point> 60 ret.32 $1 61 62 63 and_2: 64 .L8: 65 <entry-point> 66 setne.32 %r25 <- %arg1, $0 67 ret.32 %r25 68 69 70 or_2: 71 .L10: 72 <entry-point> 73 ret.32 $1 74 75 76 * check-output-end 77 */ 78