mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-30 07:33:23 +00:00
74179a9dde
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). llvm-svn: 63482
12 lines
368 B
LLVM
12 lines
368 B
LLVM
; 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 ; <i512> [#uses=1]
|
|
%C = lshr i512 %B, 448 ; <i512> [#uses=1]
|
|
%D = trunc i512 %C to i64 ; <i64> [#uses=1]
|
|
volatile store i64 %D, i64* %Q
|
|
ret void
|
|
}
|