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
4 ;; Verify that the machine instructions generated from the first
5 ;; getelementptr don't get sunk below the callbr. (Reduced from a bug
8 %struct1 = type { i8*, i32 }
10 define void @klist_dec_and_del(%struct1*) {
11 ; CHECK-LABEL: klist_dec_and_del:
13 ; CHECK-NEXT: leaq 8(%rdi), %rax
15 ; CHECK-NEXT: # 8(%rdi) .LBB0_1
17 ; CHECK-NEXT: # %bb.2:
19 ; CHECK-NEXT: .LBB0_1: # Block address taken
20 ; CHECK-NEXT: # Label of block must be emitted
21 ; CHECK-NEXT: movq $0, -8(%rax)
23 %2 = getelementptr inbounds %struct1, %struct1* %0, i64 0, i32 1
24 callbr void asm sideeffect "# $0 $1", "*m,!i,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %2)
25 to label %6 [label %3]
28 %4 = getelementptr i32, i32* %2, i64 -2
29 %5 = bitcast i32* %4 to i8**
30 store i8* null, i8** %5, align 8