aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/avx-shift.ll
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-02-04 15:19:33 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-02-04 15:19:33 +0000
commita220aeb58f30a6b3fc991883e8107d5e1198c53b (patch)
treec8a3fea7ba6af0b3f32fc4651a64edb3d12d57c7 /test/CodeGen/X86/avx-shift.ll
parent9fa9251bbad191feb52273b0f3d44531a5fd78a0 (diff)
X86: Open up some opportunities for constant folding by postponing shift lowering.
Fixes PR15141. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-shift.ll')
-rw-r--r--test/CodeGen/X86/avx-shift.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-shift.ll b/test/CodeGen/X86/avx-shift.ll
index 681747b844..b0bff454c1 100644
--- a/test/CodeGen/X86/avx-shift.ll
+++ b/test/CodeGen/X86/avx-shift.ll
@@ -112,6 +112,16 @@ define <8 x i32> @vshift08(<8 x i32> %a) nounwind {
ret <8 x i32> %bitop
}
+; PR15141
+; CHECK: _vshift13:
+; CHECK-NOT: vpsll
+; CHECK: vcvttps2dq
+; CHECK-NEXT: vpmulld
+define <4 x i32> @vshift13(<4 x i32> %in) {
+ %T = shl <4 x i32> %in, <i32 0, i32 1, i32 2, i32 4>
+ ret <4 x i32> %T
+}
+
;;; Uses shifts for sign extension
; CHECK: _sext_v16i16
; CHECK: vpsllw