Evan Cheng | 9ab2b98 | 2009-12-18 21:31:31 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -march=x86 | FileCheck %s |
| 2 | ; rdar://7475489 |
| 3 | |
| 4 | define i32 @t(i32 %a, i32 %b) nounwind ssp { |
| 5 | entry: |
| 6 | ; CHECK: t: |
| 7 | ; CHECK: xorb |
| 8 | ; CHECK-NOT: andb |
| 9 | ; CHECK-NOT: shrb |
| 10 | ; CHECK: testb $64 |
| 11 | %0 = and i32 %a, 16384 |
| 12 | %1 = icmp ne i32 %0, 0 |
| 13 | %2 = and i32 %b, 16384 |
| 14 | %3 = icmp ne i32 %2, 0 |
| 15 | %4 = xor i1 %1, %3 |
| 16 | br i1 %4, label %bb1, label %bb |
| 17 | |
| 18 | bb: ; preds = %entry |
| 19 | %5 = tail call i32 (...)* @foo() nounwind ; <i32> [#uses=1] |
| 20 | ret i32 %5 |
| 21 | |
| 22 | bb1: ; preds = %entry |
| 23 | %6 = tail call i32 (...)* @bar() nounwind ; <i32> [#uses=1] |
| 24 | ret i32 %6 |
| 25 | } |
| 26 | |
| 27 | declare i32 @foo(...) |
| 28 | |
| 29 | declare i32 @bar(...) |