Dan Gohman | da594cf | 2009-09-09 00:09:15 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -march=systemz | grep sra | count 6 |
| 2 | ; RUN: llc < %s -march=systemz | grep srag | count 3 |
| 3 | ; RUN: llc < %s -march=systemz | grep srl | count 6 |
| 4 | ; RUN: llc < %s -march=systemz | grep srlg | count 3 |
| 5 | ; RUN: llc < %s -march=systemz | grep sll | count 6 |
| 6 | ; RUN: llc < %s -march=systemz | grep sllg | count 3 |
Anton Korobeynikov | a58fac9 | 2009-07-16 13:43:18 +0000 | [diff] [blame] | 7 | |
| 8 | define signext i32 @foo1(i32 %a, i32 %idx) nounwind readnone { |
| 9 | entry: |
| 10 | %add = add i32 %idx, 1 ; <i32> [#uses=1] |
| 11 | %shr = ashr i32 %a, %add ; <i32> [#uses=1] |
| 12 | ret i32 %shr |
| 13 | } |
| 14 | |
| 15 | define signext i32 @foo2(i32 %a, i32 %idx) nounwind readnone { |
| 16 | entry: |
| 17 | %add = add i32 %idx, 1 ; <i32> [#uses=1] |
| 18 | %shr = shl i32 %a, %add ; <i32> [#uses=1] |
| 19 | ret i32 %shr |
| 20 | } |
| 21 | |
| 22 | define signext i32 @foo3(i32 %a, i32 %idx) nounwind readnone { |
| 23 | entry: |
| 24 | %add = add i32 %idx, 1 ; <i32> [#uses=1] |
| 25 | %shr = lshr i32 %a, %add ; <i32> [#uses=1] |
| 26 | ret i32 %shr |
| 27 | } |
| 28 | |
| 29 | define signext i64 @foo4(i64 %a, i64 %idx) nounwind readnone { |
| 30 | entry: |
| 31 | %add = add i64 %idx, 1 ; <i64> [#uses=1] |
| 32 | %shr = ashr i64 %a, %add ; <i64> [#uses=1] |
| 33 | ret i64 %shr |
| 34 | } |
| 35 | |
| 36 | define signext i64 @foo5(i64 %a, i64 %idx) nounwind readnone { |
| 37 | entry: |
| 38 | %add = add i64 %idx, 1 ; <i64> [#uses=1] |
| 39 | %shr = shl i64 %a, %add ; <i64> [#uses=1] |
| 40 | ret i64 %shr |
| 41 | } |
| 42 | |
| 43 | define signext i64 @foo6(i64 %a, i64 %idx) nounwind readnone { |
| 44 | entry: |
| 45 | %add = add i64 %idx, 1 ; <i64> [#uses=1] |
| 46 | %shr = lshr i64 %a, %add ; <i64> [#uses=1] |
| 47 | ret i64 %shr |
| 48 | } |
| 49 | |
| 50 | define signext i32 @foo7(i32 %a, i32 %idx) nounwind readnone { |
| 51 | entry: |
| 52 | %shr = ashr i32 %a, 1 |
| 53 | ret i32 %shr |
| 54 | } |
| 55 | |
| 56 | define signext i32 @foo8(i32 %a, i32 %idx) nounwind readnone { |
| 57 | entry: |
| 58 | %shr = shl i32 %a, 1 |
| 59 | ret i32 %shr |
| 60 | } |
| 61 | |
| 62 | define signext i32 @foo9(i32 %a, i32 %idx) nounwind readnone { |
| 63 | entry: |
| 64 | %shr = lshr i32 %a, 1 |
| 65 | ret i32 %shr |
| 66 | } |
| 67 | |
| 68 | define signext i32 @foo10(i32 %a, i32 %idx) nounwind readnone { |
| 69 | entry: |
| 70 | %shr = ashr i32 %a, %idx |
| 71 | ret i32 %shr |
| 72 | } |
| 73 | |
| 74 | define signext i32 @foo11(i32 %a, i32 %idx) nounwind readnone { |
| 75 | entry: |
| 76 | %shr = shl i32 %a, %idx |
| 77 | ret i32 %shr |
| 78 | } |
| 79 | |
| 80 | define signext i32 @foo12(i32 %a, i32 %idx) nounwind readnone { |
| 81 | entry: |
| 82 | %shr = lshr i32 %a, %idx |
| 83 | ret i32 %shr |
| 84 | } |
| 85 | |
| 86 | define signext i64 @foo13(i64 %a, i64 %idx) nounwind readnone { |
| 87 | entry: |
| 88 | %shr = ashr i64 %a, 1 |
| 89 | ret i64 %shr |
| 90 | } |
| 91 | |
| 92 | define signext i64 @foo14(i64 %a, i64 %idx) nounwind readnone { |
| 93 | entry: |
| 94 | %shr = shl i64 %a, 1 |
| 95 | ret i64 %shr |
| 96 | } |
| 97 | |
| 98 | define signext i64 @foo15(i64 %a, i64 %idx) nounwind readnone { |
| 99 | entry: |
| 100 | %shr = lshr i64 %a, 1 |
| 101 | ret i64 %shr |
| 102 | } |
| 103 | |
| 104 | define signext i64 @foo16(i64 %a, i64 %idx) nounwind readnone { |
| 105 | entry: |
| 106 | %shr = ashr i64 %a, %idx |
| 107 | ret i64 %shr |
| 108 | } |
| 109 | |
| 110 | define signext i64 @foo17(i64 %a, i64 %idx) nounwind readnone { |
| 111 | entry: |
| 112 | %shr = shl i64 %a, %idx |
| 113 | ret i64 %shr |
| 114 | } |
| 115 | |
| 116 | define signext i64 @foo18(i64 %a, i64 %idx) nounwind readnone { |
| 117 | entry: |
| 118 | %shr = lshr i64 %a, %idx |
| 119 | ret i64 %shr |
| 120 | } |
| 121 | |