From 92abc62399881ba9c525be80362c134ad836e2d9 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Sat, 31 Jan 2009 15:50:11 +0000 Subject: Fix PR3401: when using large integers, the type returned by getShiftAmountTy may be too small to hold shift values (it is an i8 on x86-32). Before and during type legalization, use a large but legal type for shift amounts: getPointerTy; afterwards use getShiftAmountTy, fixing up any shift amounts with a big type during operation legalization. Thanks to Dan for writing the original patch (which I shamelessly pillaged). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63482 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/2009-01-31-BigShift2.ll | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/CodeGen/X86/2009-01-31-BigShift2.ll (limited to 'test/CodeGen/X86/2009-01-31-BigShift2.ll') diff --git a/test/CodeGen/X86/2009-01-31-BigShift2.ll b/test/CodeGen/X86/2009-01-31-BigShift2.ll new file mode 100644 index 0000000..2b5b189 --- /dev/null +++ b/test/CodeGen/X86/2009-01-31-BigShift2.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep {mov.*56} +; PR3449 + +define void @test(<8 x double>* %P, i64* %Q) nounwind { + %A = load <8 x double>* %P ; <<8 x double>> [#uses=1] + %B = bitcast <8 x double> %A to i512 ; [#uses=1] + %C = lshr i512 %B, 448 ; [#uses=1] + %D = trunc i512 %C to i64 ; [#uses=1] + volatile store i64 %D, i64* %Q + ret void +} -- cgit v1.1