Chris Lattner | 55e81eb | 2010-03-05 06:19:13 +0000 | [diff] [blame^] | 1 | ; RUN: llc -march=x86 %s -o - |
| 2 | ; RUN: llc -march=x86-64 %s -o - |
| 3 | |
| 4 | ; PR6497 |
| 5 | |
| 6 | ; Chain and flag folding issues. |
| 7 | define i32 @test1() nounwind ssp { |
| 8 | entry: |
| 9 | %tmp5.i = volatile load i32* undef ; <i32> [#uses=1] |
| 10 | %conv.i = zext i32 %tmp5.i to i64 ; <i64> [#uses=1] |
| 11 | %tmp12.i = volatile load i32* undef ; <i32> [#uses=1] |
| 12 | %conv13.i = zext i32 %tmp12.i to i64 ; <i64> [#uses=1] |
| 13 | %shl.i = shl i64 %conv13.i, 32 ; <i64> [#uses=1] |
| 14 | %or.i = or i64 %shl.i, %conv.i ; <i64> [#uses=1] |
| 15 | %add16.i = add i64 %or.i, 256 ; <i64> [#uses=1] |
| 16 | %shr.i = lshr i64 %add16.i, 8 ; <i64> [#uses=1] |
| 17 | %conv19.i = trunc i64 %shr.i to i32 ; <i32> [#uses=1] |
| 18 | volatile store i32 %conv19.i, i32* undef |
| 19 | ret i32 undef |
| 20 | } |