mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-29 13:29:28 +00:00
In this patch we optimize this pattern and convert the sequence into extract op of a narrow type. This allows the BUILD_VECTOR dag optimizations to construct efficient shuffle operations in many cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149692 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
393 B
LLVM
16 lines
393 B
LLVM
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s
|
|
|
|
; Make sure that the conversion between v4i8 to v2i16 is not a simple bitcast.
|
|
; CHECK: prom_bug
|
|
; CHECK: shufb
|
|
; CHECK: movd
|
|
; CHECK: movw
|
|
; CHECK: ret
|
|
define void @prom_bug(<4 x i8> %t, i16* %p) {
|
|
%r = bitcast <4 x i8> %t to <2 x i16>
|
|
%o = extractelement <2 x i16> %r, i32 0
|
|
store i16 %o, i16* %p
|
|
ret void
|
|
}
|
|
|