1 ; RUN: llc < %s -O2 --code-model=kernel | FileCheck %s
2 ; The intent of the test is that we do not generate conditional
3 ; tail calls to the thunk.
5 target triple = "x86_64-unknown-linux-gnu"
7 define dso_local void @foo(ptr %something) #0 {
9 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: movq (%rdi), %r11
11 ; CHECK-NEXT: testq %r11, %r11
12 ; Make sure that a JNE was not generated instead of a JE + JMP sequence
14 ; CHECK-NEXT: je .LBB0_1
15 ; CHECK-NEXT: bb.2: # %if.then
16 ; CHECK-NEXT: jmp __x86_indirect_thunk_r11
20 %0 = load ptr, ptr %something, align 8
21 %tobool.not = icmp eq ptr %0, null
22 br i1 %tobool.not, label %if.end, label %if.then
32 attributes #0 = { optsize "target-features"="+retpoline-external-thunk" }