Akira Hatanaka | 2df483e | 2012-09-27 02:11:20 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=mipsel -mattr=+dspr2 < %s | FileCheck %s |
| 2 | |
| 3 | define i64 @test__builtin_mips_dpa_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind readnone { |
| 4 | entry: |
| 5 | ; CHECK: dpa.w.ph |
| 6 | |
| 7 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 8 | %2 = bitcast i32 %a2.coerce to <2 x i16> |
| 9 | %3 = tail call i64 @llvm.mips.dpa.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2) |
| 10 | ret i64 %3 |
| 11 | } |
| 12 | |
| 13 | declare i64 @llvm.mips.dpa.w.ph(i64, <2 x i16>, <2 x i16>) nounwind readnone |
| 14 | |
| 15 | define i64 @test__builtin_mips_dps_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind readnone { |
| 16 | entry: |
| 17 | ; CHECK: dps.w.ph |
| 18 | |
| 19 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 20 | %2 = bitcast i32 %a2.coerce to <2 x i16> |
| 21 | %3 = tail call i64 @llvm.mips.dps.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2) |
| 22 | ret i64 %3 |
| 23 | } |
| 24 | |
| 25 | declare i64 @llvm.mips.dps.w.ph(i64, <2 x i16>, <2 x i16>) nounwind readnone |
| 26 | |
| 27 | define i64 @test__builtin_mips_mulsa_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind readnone { |
| 28 | entry: |
| 29 | ; CHECK: mulsa.w.ph |
| 30 | |
| 31 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 32 | %2 = bitcast i32 %a2.coerce to <2 x i16> |
| 33 | %3 = tail call i64 @llvm.mips.mulsa.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2) |
| 34 | ret i64 %3 |
| 35 | } |
| 36 | |
| 37 | declare i64 @llvm.mips.mulsa.w.ph(i64, <2 x i16>, <2 x i16>) nounwind readnone |
| 38 | |
| 39 | define i64 @test__builtin_mips_dpax_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind readnone { |
| 40 | entry: |
| 41 | ; CHECK: dpax.w.ph |
| 42 | |
| 43 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 44 | %2 = bitcast i32 %a2.coerce to <2 x i16> |
| 45 | %3 = tail call i64 @llvm.mips.dpax.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2) |
| 46 | ret i64 %3 |
| 47 | } |
| 48 | |
| 49 | declare i64 @llvm.mips.dpax.w.ph(i64, <2 x i16>, <2 x i16>) nounwind readnone |
| 50 | |
| 51 | define i64 @test__builtin_mips_dpsx_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind readnone { |
| 52 | entry: |
| 53 | ; CHECK: dpsx.w.ph |
| 54 | |
| 55 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 56 | %2 = bitcast i32 %a2.coerce to <2 x i16> |
| 57 | %3 = tail call i64 @llvm.mips.dpsx.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2) |
| 58 | ret i64 %3 |
| 59 | } |
| 60 | |
| 61 | declare i64 @llvm.mips.dpsx.w.ph(i64, <2 x i16>, <2 x i16>) nounwind readnone |
| 62 | |
| 63 | define i64 @test__builtin_mips_dpaqx_s_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind { |
| 64 | entry: |
| 65 | ; CHECK: dpaqx_s.w.ph |
| 66 | |
| 67 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 68 | %2 = bitcast i32 %a2.coerce to <2 x i16> |
| 69 | %3 = tail call i64 @llvm.mips.dpaqx.s.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2) |
| 70 | ret i64 %3 |
| 71 | } |
| 72 | |
| 73 | declare i64 @llvm.mips.dpaqx.s.w.ph(i64, <2 x i16>, <2 x i16>) nounwind |
| 74 | |
| 75 | define i64 @test__builtin_mips_dpaqx_sa_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind { |
| 76 | entry: |
| 77 | ; CHECK: dpaqx_sa.w.ph |
| 78 | |
| 79 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 80 | %2 = bitcast i32 %a2.coerce to <2 x i16> |
| 81 | %3 = tail call i64 @llvm.mips.dpaqx.sa.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2) |
| 82 | ret i64 %3 |
| 83 | } |
| 84 | |
| 85 | declare i64 @llvm.mips.dpaqx.sa.w.ph(i64, <2 x i16>, <2 x i16>) nounwind |
| 86 | |
| 87 | define i64 @test__builtin_mips_dpsqx_s_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind { |
| 88 | entry: |
| 89 | ; CHECK: dpsqx_s.w.ph |
| 90 | |
| 91 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 92 | %2 = bitcast i32 %a2.coerce to <2 x i16> |
| 93 | %3 = tail call i64 @llvm.mips.dpsqx.s.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2) |
| 94 | ret i64 %3 |
| 95 | } |
| 96 | |
| 97 | declare i64 @llvm.mips.dpsqx.s.w.ph(i64, <2 x i16>, <2 x i16>) nounwind |
| 98 | |
| 99 | define i64 @test__builtin_mips_dpsqx_sa_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind { |
| 100 | entry: |
| 101 | ; CHECK: dpsqx_sa.w.ph |
| 102 | |
| 103 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 104 | %2 = bitcast i32 %a2.coerce to <2 x i16> |
| 105 | %3 = tail call i64 @llvm.mips.dpsqx.sa.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2) |
| 106 | ret i64 %3 |
| 107 | } |
| 108 | |
| 109 | declare i64 @llvm.mips.dpsqx.sa.w.ph(i64, <2 x i16>, <2 x i16>) nounwind |
Akira Hatanaka | a216401 | 2012-09-27 03:13:59 +0000 | [diff] [blame] | 110 | |
| 111 | define { i32 } @test__builtin_mips_addu_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind { |
| 112 | entry: |
| 113 | ; CHECK: addu.ph |
| 114 | |
| 115 | %0 = bitcast i32 %a0.coerce to <2 x i16> |
| 116 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 117 | %2 = tail call <2 x i16> @llvm.mips.addu.ph(<2 x i16> %0, <2 x i16> %1) |
| 118 | %3 = bitcast <2 x i16> %2 to i32 |
| 119 | %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0 |
| 120 | ret { i32 } %.fca.0.insert |
| 121 | } |
| 122 | |
| 123 | declare <2 x i16> @llvm.mips.addu.ph(<2 x i16>, <2 x i16>) nounwind |
| 124 | |
| 125 | define { i32 } @test__builtin_mips_addu_s_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind { |
| 126 | entry: |
| 127 | ; CHECK: addu_s.ph |
| 128 | |
| 129 | %0 = bitcast i32 %a0.coerce to <2 x i16> |
| 130 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 131 | %2 = tail call <2 x i16> @llvm.mips.addu.s.ph(<2 x i16> %0, <2 x i16> %1) |
| 132 | %3 = bitcast <2 x i16> %2 to i32 |
| 133 | %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0 |
| 134 | ret { i32 } %.fca.0.insert |
| 135 | } |
| 136 | |
| 137 | declare <2 x i16> @llvm.mips.addu.s.ph(<2 x i16>, <2 x i16>) nounwind |
| 138 | |
| 139 | define { i32 } @test__builtin_mips_mulq_s_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind { |
| 140 | entry: |
| 141 | ; CHECK: mulq_s.ph |
| 142 | |
| 143 | %0 = bitcast i32 %a0.coerce to <2 x i16> |
| 144 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 145 | %2 = tail call <2 x i16> @llvm.mips.mulq.s.ph(<2 x i16> %0, <2 x i16> %1) |
| 146 | %3 = bitcast <2 x i16> %2 to i32 |
| 147 | %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0 |
| 148 | ret { i32 } %.fca.0.insert |
| 149 | } |
| 150 | |
| 151 | declare <2 x i16> @llvm.mips.mulq.s.ph(<2 x i16>, <2 x i16>) nounwind |
| 152 | |
| 153 | define { i32 } @test__builtin_mips_subu_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind { |
| 154 | entry: |
| 155 | ; CHECK: subu.ph |
| 156 | |
| 157 | %0 = bitcast i32 %a0.coerce to <2 x i16> |
| 158 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 159 | %2 = tail call <2 x i16> @llvm.mips.subu.ph(<2 x i16> %0, <2 x i16> %1) |
| 160 | %3 = bitcast <2 x i16> %2 to i32 |
| 161 | %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0 |
| 162 | ret { i32 } %.fca.0.insert |
| 163 | } |
| 164 | |
| 165 | declare <2 x i16> @llvm.mips.subu.ph(<2 x i16>, <2 x i16>) nounwind |
| 166 | |
| 167 | define { i32 } @test__builtin_mips_subu_s_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind { |
| 168 | entry: |
| 169 | ; CHECK: subu_s.ph |
| 170 | |
| 171 | %0 = bitcast i32 %a0.coerce to <2 x i16> |
| 172 | %1 = bitcast i32 %a1.coerce to <2 x i16> |
| 173 | %2 = tail call <2 x i16> @llvm.mips.subu.s.ph(<2 x i16> %0, <2 x i16> %1) |
| 174 | %3 = bitcast <2 x i16> %2 to i32 |
| 175 | %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0 |
| 176 | ret { i32 } %.fca.0.insert |
| 177 | } |
| 178 | |
| 179 | declare <2 x i16> @llvm.mips.subu.s.ph(<2 x i16>, <2 x i16>) nounwind |