1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s 3 4;; Verify that the machine instructions generated from the first 5;; getelementptr don't get sunk below the callbr. (Reduced from a bug 6;; report.) 7 8%struct1 = type { i8*, i32 } 9 10define void @klist_dec_and_del(%struct1*) { 11; CHECK-LABEL: klist_dec_and_del: 12; CHECK: # %bb.0: 13; CHECK-NEXT: leaq 8(%rdi), %rax 14; CHECK-NEXT: #APP 15; CHECK-NEXT: # 8(%rdi) .Ltmp0 16; CHECK-NEXT: #NO_APP 17; CHECK-NEXT: # %bb.2: 18; CHECK-NEXT: retq 19; CHECK-NEXT: .Ltmp0: # Block address taken 20; CHECK-NEXT: .LBB0_1: 21; CHECK-NEXT: movq $0, -8(%rax) 22; CHECK-NEXT: retq 23 %2 = getelementptr inbounds %struct1, %struct1* %0, i64 0, i32 1 24 callbr void asm sideeffect "# $0 $1", "*m,X,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* %2, i8* blockaddress(@klist_dec_and_del, %3)) 25 to label %6 [label %3] 26 273: 28 %4 = getelementptr i32, i32* %2, i64 -2 29 %5 = bitcast i32* %4 to i8** 30 store i8* null, i8** %5, align 8 31 br label %6 32 336: 34 ret void 35} 36