
Similar to 806761a7629df268c8aed49657aeccffa6bca449 -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple (e.g. Windows, macOS), leaving a target triple which may not make sense. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize arc-apple-darwin as ELF instead of rejecting it outrightly.
40 lines
746 B
LLVM
40 lines
746 B
LLVM
; RUN: llc -mtriple=arc < %s | FileCheck %s
|
|
|
|
; CHECK-LABEL: brcc1:
|
|
; CHECK: brne %r0, %r1, @.LBB0_2
|
|
; CHECK: add %r0, %r0, 4
|
|
; CHECK: .LBB0_2:
|
|
define i32 @brcc1(i32 %a, i32 %b) nounwind {
|
|
entry:
|
|
%wb = icmp eq i32 %a, %b
|
|
br i1 %wb, label %t1, label %t2
|
|
t1:
|
|
%t1v = add i32 %a, 4
|
|
br label %exit
|
|
t2:
|
|
%t2v = add i32 %b, 8
|
|
br label %exit
|
|
exit:
|
|
%v = phi i32 [ %t1v, %t1 ], [ %t2v, %t2 ]
|
|
ret i32 %v
|
|
}
|
|
|
|
; CHECK-LABEL: brcc2
|
|
; CHECK: breq %r0, %r1
|
|
define i32 @brcc2(i32 %a, i32 %b) nounwind {
|
|
entry:
|
|
%wb = icmp ne i32 %a, %b
|
|
br i1 %wb, label %t1, label %t2
|
|
t1:
|
|
%t1v = add i32 %a, 4
|
|
br label %exit
|
|
t2:
|
|
%t2v = add i32 %b, 8
|
|
br label %exit
|
|
exit:
|
|
%v = phi i32 [ %t1v, %t1 ], [ %t2v, %t2 ]
|
|
ret i32 %v
|
|
}
|
|
|
|
|