summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/tailcall-assume.ll
blob: 3baac9c412119c4a310863304682a686ccc14137 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: llc -mtriple=x86_64-linux < %s | FileCheck %s

; Intrinsic call to @llvm.assume should not prevent tail call optimization.
; CHECK-LABEL: foo:
; CHECK:       jmp bar # TAILCALL
define i8* @foo() {
  %1 = tail call i8* @bar()
  %2 = icmp ne i8* %1, null
  tail call void @llvm.assume(i1 %2)
  ret i8* %1
}

declare i8* @bar()
declare void @llvm.assume(i1)

OpenPOWER on IntegriCloud