aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/cast-and-cast.ll
blob: 64647fb5bbd1cbd5761ca21cf25090fadddfa41d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep bitcast

bool %test1(uint %val) {
  %t1 = bitcast uint %val to int 
  %t2 = and int %t1, 1
  %t3 = trunc int %t2 to bool
  ret bool %t3
}

short %test1(uint %val) {
  %t1 = bitcast uint %val to int 
  %t2 = and int %t1, 1
  %t3 = trunc int %t2 to short
  ret short %t3
}