aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/cast-call-combine.ll
blob: be70a8763ea8862cb4fa549e6bc14965a46a1cb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; RUN: opt < %s -always-inline -instcombine -S | FileCheck %s

define internal void @foo(i16*) alwaysinline {
  ret void
}

define void @bar() noinline noreturn {
  unreachable
}

define void @test() {
  br i1 false, label %then, label %else

then:
  call void @bar()
  unreachable

else:
  ; CHECK-NOT: call
  call void bitcast (void (i16*)* @foo to void (i8*)*) (i8* null)
  ret void
}