49 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s | FileCheck %s3; RUN: llc -relocation-model=pic < %s | FileCheck %s --check-prefix=PIC4 5target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"6target triple = "x86_64-unknown-linux-gnu"7 8@foo = external global i8, align 1, !absolute_symbol !09 10define void @bar(ptr %x) {11; CHECK-LABEL: bar:12; CHECK: # %bb.0: # %entry13; CHECK-NEXT: testb $foo, (%rdi)14; CHECK-NEXT: je .LBB0_115; CHECK-NEXT: # %bb.2: # %if.then16; CHECK-NEXT: xorl %eax, %eax17; CHECK-NEXT: jmp xf@PLT # TAILCALL18; CHECK-NEXT: .LBB0_1: # %if.end19; CHECK-NEXT: retq20;21; PIC-LABEL: bar:22; PIC: # %bb.0: # %entry23; PIC-NEXT: testb $foo, (%rdi)24; PIC-NEXT: je .LBB0_125; PIC-NEXT: # %bb.2: # %if.then26; PIC-NEXT: xorl %eax, %eax27; PIC-NEXT: jmp xf@PLT # TAILCALL28; PIC-NEXT: .LBB0_1: # %if.end29; PIC-NEXT: retq30entry:31 %0 = load i8, ptr %x, align 132 %conv = sext i8 %0 to i3233 %ext = sext i8 ptrtoint (ptr @foo to i8) to i3234 %and = and i32 %conv, %ext35 %tobool = icmp eq i32 %and, 036 br i1 %tobool, label %if.end, label %if.then37 38if.then: ; preds = %entry39 tail call void (...) @xf()40 br label %if.end41 42if.end: ; preds = %entry, %if.then43 ret void44}45 46declare void @xf(...)47 48!0 = !{i64 0, i64 256}49