aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/bitcast-vec-uniform.ll
blob: a0d4678b0a04862c9d34e34947769590e0976a6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
; RUN: opt < %s -instcombine -S | FileCheck %s

; CHECK: @a
; CHECK-NOT: bitcast
; CHECK: ret
define <4 x i32> @a(<1 x i64> %y) {
  %c = bitcast <2 x i64> <i64 0, i64 0> to <4 x i32>
  ret <4 x i32> %c
}

; CHECK: @b
; CHECK-NOT: bitcast
; CHECK: ret

define <4 x i32> @b(<1 x i64> %y) {
  %c = bitcast <2 x i64> <i64 -1, i64 -1> to <4 x i32>
  ret <4 x i32> %c
}

; CHECK: @foo
; CHECK: bitcast

; from MultiSource/Benchmarks/Bullet
define <2 x float> @foo() {
  %cast = bitcast i64 -1 to <2 x float>
  ret <2 x float> %cast
}