mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
07edaf3801
- Folding (trunc (concat ... X )) to (concat ... (trunc X) ...) is valid when '...' are all 'undef's. - r166125 relies on this transformation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166155 91177308-0d34-0410-b5e6-96231b3b80d8
18 lines
648 B
LLVM
18 lines
648 B
LLVM
; RUN: llc < %s -mcpu=corei7 -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
|
|
|
|
define void @foo(<4 x float> %in, <4 x i8>* %out) {
|
|
%t0 = fptosi <4 x float> %in to <4 x i32>
|
|
%t1 = trunc <4 x i32> %t0 to <4 x i16>
|
|
%t2 = shufflevector <4 x i16> %t1, <4 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
|
|
%t3 = trunc <8 x i16> %t2 to <8 x i8>
|
|
%t4 = shufflevector <8 x i8> %t3, <8 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
|
|
%t5 = insertelement <4 x i8> %t4, i8 -1, i32 3
|
|
store <4 x i8> %t5, <4 x i8>* %out
|
|
ret void
|
|
; CHECK: foo
|
|
; CHECK: cvttps2dq
|
|
; CHECK-NOT: pextrd
|
|
; CHECK: pshufb
|
|
; CHECK: ret
|
|
}
|