Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep shrl |
| 2 | ; Bug in FindModifiedNodeSlot cause tmp14 load to become a zextload and shr 31 |
| 3 | ; is then optimized away. |
| 4 | |
| 5 | %tree_code_type = external global [0 x uint] |
| 6 | |
| 7 | void %copy_if_shared_r() { |
| 8 | %tmp = load uint* null |
| 9 | %tmp56 = and uint %tmp, 255 |
| 10 | %tmp8 = getelementptr [0 x uint]* %tree_code_type, int 0, uint %tmp56 |
| 11 | %tmp9 = load uint* %tmp8 |
| 12 | %tmp10 = add uint %tmp9, 4294967295 |
| 13 | %tmp = setgt uint %tmp10, 2 |
| 14 | %tmp14 = load uint* null |
| 15 | %tmp15 = shr uint %tmp14, ubyte 31 |
| 16 | %tmp15 = cast uint %tmp15 to ubyte |
| 17 | %tmp16 = setne ubyte %tmp15, 0 |
| 18 | br bool %tmp, label %cond_false25, label %cond_true |
| 19 | |
| 20 | cond_true: |
| 21 | br bool %tmp16, label %cond_true17, label %cond_false |
| 22 | |
| 23 | cond_true17: |
| 24 | ret void |
| 25 | |
| 26 | cond_false: |
| 27 | ret void |
| 28 | |
| 29 | cond_false25: |
| 30 | ret void |
| 31 | } |