mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-12 15:05:06 +00:00
b6fbec3a54
patch we add a flag to enable a new type legalization decision - to promote integer elements in vectors. Currently, the rest of the codegen does not support this kind of legalization. This flag will be removed when the transition is complete. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132394 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
563 B
LLVM
16 lines
563 B
LLVM
; Test that vectors are scalarized/lowered correctly.
|
|
; RUN: llc -march=x86 -promote-elements < %s | FileCheck %s
|
|
|
|
; This test is the poster-child for integer-element-promotion.
|
|
; Until this feature is complete, we mark this test as expected to fail.
|
|
; XFAIL: *
|
|
; CHECK: vector_code
|
|
; CHECK: ret
|
|
define <4 x float> @vector_code(<4 x i64> %A, <4 x i64> %B, <4 x float> %R0, <4 x float> %R1 ) {
|
|
%C = icmp eq <4 x i64> %A, %B
|
|
%K = xor <4 x i1> <i1 1, i1 1, i1 1, i1 1>, %C
|
|
%D = select <4 x i1> %K, <4 x float> %R1, <4 x float> %R0
|
|
ret <4 x float> %D
|
|
}
|
|
|