
Similar to 806761a7629df268c8aed49657aeccffa6bca449 -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple, 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 $unknown-apple-darwin as ELF instead of rejecting it outrightly.
32 lines
906 B
LLVM
32 lines
906 B
LLVM
; RUN: llc -mtriple=hexagon < %s | FileCheck %s
|
|
|
|
; Check that the parsing succeeded.
|
|
; CHECK: f0
|
|
|
|
target triple = "hexagon"
|
|
|
|
@g0 = external global [0 x i16], align 8
|
|
|
|
; Function Attrs: nounwind
|
|
define void @f0() #0 {
|
|
b0:
|
|
br label %b2
|
|
|
|
b1: ; preds = %b2
|
|
ret void
|
|
|
|
b2: ; preds = %b2, %b0
|
|
%v0 = phi i32 [ 0, %b0 ], [ %v1, %b2 ]
|
|
%v1 = add nsw i32 %v0, 4
|
|
%v2 = getelementptr [0 x i16], ptr @g0, i32 0, i32 %v0
|
|
%v4 = load <4 x i16>, ptr %v2, align 2
|
|
%v5 = icmp slt <4 x i16> %v4, zeroinitializer
|
|
%v6 = xor <4 x i16> %v4, <i16 -32768, i16 -32768, i16 -32768, i16 -32768>
|
|
%v7 = select <4 x i1> %v5, <4 x i16> %v6, <4 x i16> zeroinitializer
|
|
store <4 x i16> %v7, ptr %v2, align 2
|
|
%v8 = icmp slt i32 %v1, 32768
|
|
br i1 %v8, label %b2, label %b1
|
|
}
|
|
|
|
attributes #0 = { nounwind "target-cpu"="hexagonv55" }
|