llvm-project/llvm/test/CodeGen/Hexagon/rdf-dead-loop.ll
Fangrui Song 2208c97c1b [Hexagon,test] Change llc -march= to -mtriple=
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.
2024-12-15 10:20:22 -08:00

31 lines
1017 B
LLVM

; RUN: llc -mtriple=hexagon < %s | FileCheck %s
; CHECK-NOT: ={{.*}}add
; CHECK-NOT: mem{{[bdhwu]}}
define void @main() #0 {
entry:
br label %body
body:
%ip_vec30 = phi <2 x i32> [ %ip_vec, %body ], [ zeroinitializer, %entry ]
%scevgep.phi = phi ptr [ %scevgep.inc, %body ], [ undef, %entry ]
%polly.indvar = phi i32 [ %polly.indvar_next, %body ], [ 0, %entry ]
%_p_vec_full = load <2 x i32>, ptr %scevgep.phi, align 8
%ip_vec = add <2 x i32> %_p_vec_full, %ip_vec30
%polly.indvar_next = add nsw i32 %polly.indvar, 2
%polly.loop_cond = icmp slt i32 %polly.indvar, 4
%scevgep.inc = getelementptr i32, ptr %scevgep.phi, i32 2
br i1 %polly.loop_cond, label %body, label %exit
exit:
%0 = extractelement <2 x i32> %ip_vec, i32 1
ret void
}
attributes #0 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
!0 = !{!"int", !1}
!1 = !{!"omnipotent char", !2}
!2 = !{!"Simple C/C++ TBAA"}