brintos

brintos / llvm-project-archived public Read only

0
0
Text · 775 B · 266f12e Raw
23 lines · plain
1; RUN: not llc -mtriple=x86_64-linux-gnu -o - %s 2>&1 | FileCheck %s2 3; Test that the blockaddress with X, i, or s constraint is printed as an4; immediate (.Ltmp0).5; Test that blockaddress with n constraint is an error.6define void @test1() {7; CHECK: error: constraint 'n' expects an integer constant expression8; CHECK-LABEL: test1:9; CHECK:       # %bb.0: # %entry10; CHECK-NEXT:  .Ltmp0: # Block address taken11; CHECK-NEXT:  # %bb.1: # %b12; CHECK-NEXT:    #APP13; CHECK-NEXT:    # .Ltmp0 .Ltmp0 .Ltmp014; CHECK-NEXT:    #NO_APP15; CHECK-NEXT:    retq16entry:17  br label %b18b:19  call void asm "# $0 $1 $2", "X,i,s"(ptr blockaddress(@test1, %b), ptr blockaddress(@test1, %b), ptr blockaddress(@test1, %b))20  call void asm "# $0", "n"(ptr blockaddress(@test1, %b))21  ret void22}23