summaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic/promote-integers.ll
blob: d965abf2611cb1687a957e08fc6f7e04513f22f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; 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.
; CHECK: vector_code
; CHECK: blend
; 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
}