mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
25b7d54e7f
aggressively from the x86 shuffle lowering to the generic SDAG vector shuffle formation code. This code already tried to fold away shuffles of splats! It just had lots of bugs and couldn't handle the case my new x86 shuffle lowering needed. First, it failed to correctly compute whether N2 was undef because it pre-computed this, then did transformations which could *make* N2 undef, then failed to ever re-consider the precomputed state. Second, it didn't look through bitcasts at all, even in the safe cases where they are just element-type bitcasts with no change to the number of elements. Third, it didn't handle all-zero bit casts nicely the way my code in the x86 side of things did, which is essential to getting good zext-shuffle lowerings. But all of these are generic. I just ported the code down to this layer and fixed the surrounding bugs. Tests exercising this in the x86 backend still pass and some silly code in widen_cast-6.ll gets better. I updated that test to be a bit more precise but it's still pretty unclear what the value of the test is in this day and age. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212517 91177308-0d34-0410-b5e6-96231b3b80d8
15 lines
370 B
LLVM
15 lines
370 B
LLVM
; RUN: llc < %s -march=x86 -mattr=+sse4.1 | FileCheck %s
|
|
|
|
; Test bit convert that requires widening in the operand.
|
|
|
|
define i32 @return_v2hi() nounwind {
|
|
; CHECK-LABEL: @return_v2hi
|
|
; CHECK: pushl
|
|
; CHECK-NEXT: xorl %eax, %eax
|
|
; CHECK-NEXT: popl
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%retval12 = bitcast <2 x i16> zeroinitializer to i32 ; <i32> [#uses=1]
|
|
ret i32 %retval12
|
|
}
|