Dan Gohman | 72a13d2 | 2009-09-08 22:34:10 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -instcombine -S | not grep or |
Bill Wendling | 3dfa168 | 2008-08-05 22:23:59 +0000 | [diff] [blame] | 2 | ; PR2629 |
| 3 | |
| 4 | define void @f(i8* %x) nounwind { |
| 5 | entry: |
| 6 | br label %bb |
| 7 | |
| 8 | bb: |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 9 | %g1 = getelementptr i8, i8* %x, i32 0 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 10 | %l1 = load i8, i8* %g1, align 1 |
Bill Wendling | 3dfa168 | 2008-08-05 22:23:59 +0000 | [diff] [blame] | 11 | %s1 = sub i8 %l1, 6 |
| 12 | %c1 = icmp ugt i8 %s1, 2 |
| 13 | %s2 = sub i8 %l1, 10 |
| 14 | %c2 = icmp ugt i8 %s2, 2 |
| 15 | %a1 = and i1 %c1, %c2 |
| 16 | br i1 %a1, label %incompatible, label %okay |
| 17 | |
| 18 | okay: |
| 19 | ret void |
| 20 | |
| 21 | incompatible: |
| 22 | ret void |
| 23 | } |