From 2c9da989c20aacc523b8751ca45a11f4f24f8d54 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 4 Feb 2013 15:19:33 +0000 Subject: X86: Open up some opportunities for constant folding by postponing shift lowering. Fixes PR15141. llvm-svn: 174327 --- llvm/test/CodeGen/X86/avx-shift.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'llvm/test/CodeGen/X86/avx-shift.ll') diff --git a/llvm/test/CodeGen/X86/avx-shift.ll b/llvm/test/CodeGen/X86/avx-shift.ll index 681747b844a..b0bff454c18 100644 --- a/llvm/test/CodeGen/X86/avx-shift.ll +++ b/llvm/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, + ret <4 x i32> %T +} + ;;; Uses shifts for sign extension ; CHECK: _sext_v16i16 ; CHECK: vpsllw -- cgit v1.2.3