Files
clang-p2996/llvm/test/CodeGen/X86/callbr-asm-errors.ll
Nick Desaulniers 79ebc3b0dd [llvm][test] rewrite callbr to use i rather than X constraint NFC
In D115311, we're looking to modify clang to emit i constraints rather
than X constraints for callbr's indirect destinations. Prior to doing
so, update all of the existing tests in llvm/ to match.

Reviewed By: void, jyknight

Differential Revision: https://reviews.llvm.org/D115410
2022-01-11 11:31:08 -08:00

19 lines
453 B
LLVM

; RUN: not llc -mtriple=i686-- < %s 2> %t
; RUN: FileCheck %s < %t
; CHECK: Duplicate callbr destination
; A test for asm-goto duplicate labels limitation
define i32 @test(i32 %a) {
entry:
%0 = add i32 %a, 4
callbr void asm "xorl $0, $0; jmp ${1:l}", "r,i,i,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* blockaddress(@test, %fail), i8* blockaddress(@test, %fail)) to label %normal [label %fail, label %fail]
normal:
ret i32 %0
fail:
ret i32 1
}