Dan Gohman | 30cb6dd | 2011-07-01 00:42:17 +0000 | [diff] [blame^] | 1 | ; RUN: opt -instsimplify -S < %s | FileCheck %s |
| 2 | |
| 3 | ; @test0 |
| 4 | ; CHECK: ret i64 undef |
| 5 | define i64 @test0() { |
| 6 | %r = mul i64 undef, undef |
| 7 | ret i64 %r |
| 8 | } |
| 9 | |
| 10 | ; @test1 |
| 11 | ; CHECK: ret i64 undef |
| 12 | define i64 @test1() { |
| 13 | %r = mul i64 3, undef |
| 14 | ret i64 %r |
| 15 | } |
| 16 | |
| 17 | ; @test2 |
| 18 | ; CHECK: ret i64 undef |
| 19 | define i64 @test2() { |
| 20 | %r = mul i64 undef, 3 |
| 21 | ret i64 %r |
| 22 | } |
| 23 | |
| 24 | ; @test3 |
| 25 | ; CHECK: ret i64 0 |
| 26 | define i64 @test3() { |
| 27 | %r = mul i64 undef, 6 |
| 28 | ret i64 %r |
| 29 | } |
| 30 | |
| 31 | ; @test4 |
| 32 | ; CHECK: ret i64 0 |
| 33 | define i64 @test4() { |
| 34 | %r = mul i64 6, undef |
| 35 | ret i64 %r |
| 36 | } |
| 37 | |
| 38 | ; @test5 |
| 39 | ; CHECK: ret i64 undef |
| 40 | define i64 @test5() { |
| 41 | %r = and i64 undef, undef |
| 42 | ret i64 %r |
| 43 | } |
| 44 | |
| 45 | ; @test6 |
| 46 | ; CHECK: ret i64 undef |
| 47 | define i64 @test6() { |
| 48 | %r = or i64 undef, undef |
| 49 | ret i64 %r |
| 50 | } |
| 51 | |
| 52 | ; @test7 |
| 53 | ; CHECK: ret i64 undef |
| 54 | define i64 @test7() { |
| 55 | %r = udiv i64 undef, 1 |
| 56 | ret i64 %r |
| 57 | } |
| 58 | |
| 59 | ; @test8 |
| 60 | ; CHECK: ret i64 undef |
| 61 | define i64 @test8() { |
| 62 | %r = sdiv i64 undef, 1 |
| 63 | ret i64 %r |
| 64 | } |
| 65 | |
| 66 | ; @test9 |
| 67 | ; CHECK: ret i64 0 |
| 68 | define i64 @test9() { |
| 69 | %r = urem i64 undef, 1 |
| 70 | ret i64 %r |
| 71 | } |
| 72 | |
| 73 | ; @test10 |
| 74 | ; CHECK: ret i64 0 |
| 75 | define i64 @test10() { |
| 76 | %r = srem i64 undef, 1 |
| 77 | ret i64 %r |
| 78 | } |
| 79 | |
| 80 | ; @test11 |
| 81 | ; CHECK: ret i64 undef |
| 82 | define i64 @test11() { |
| 83 | %r = shl i64 undef, undef |
| 84 | ret i64 %r |
| 85 | } |
| 86 | |
| 87 | ; @test12 |
| 88 | ; CHECK: ret i64 undef |
| 89 | define i64 @test12() { |
| 90 | %r = ashr i64 undef, undef |
| 91 | ret i64 %r |
| 92 | } |
| 93 | |
| 94 | ; @test13 |
| 95 | ; CHECK: ret i64 undef |
| 96 | define i64 @test13() { |
| 97 | %r = lshr i64 undef, undef |
| 98 | ret i64 %r |
| 99 | } |