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

46 lines
1.5 KiB
LLVM

; RUN: llc -mtriple=hexagon < %s | FileCheck %s
; Check that we don't generate an invalid packet with too many instructions
; due to a store that has a must-extend operand.
; CHECK: CuSuiteAdd.exit.us
; CHECK: {
; CHECK-NOT: call abort
; CHECK: memw(##0)
; CHECK: memw(r{{[0-9+]}}<<#2+##4)
; CHECK: }
%struct.CuTest.1.28.31.37.40.43.52.55.67.85.111 = type { ptr, ptr, i32, i32, ptr, ptr }
%struct.CuSuite.2.29.32.38.41.44.53.56.68.86.112 = type { i32, [1024 x ptr], i32 }
@__func__.CuSuiteAdd = external unnamed_addr constant [11 x i8], align 8
@.str24 = external unnamed_addr constant [140 x i8], align 8
declare void @_Assert()
define void @CuSuiteAddSuite() nounwind {
entry:
br i1 undef, label %for.body.us, label %for.end
for.body.us: ; preds = %entry
%0 = load ptr, ptr null, align 4
%1 = load i32, ptr undef, align 4
%cmp.i.us = icmp slt i32 %1, 1024
br i1 %cmp.i.us, label %CuSuiteAdd.exit.us, label %cond.false6.i.us
cond.false6.i.us: ; preds = %for.body.us
tail call void @_Assert() nounwind
unreachable
CuSuiteAdd.exit.us: ; preds = %for.body.us
%arrayidx.i.us = getelementptr inbounds %struct.CuSuite.2.29.32.38.41.44.53.56.68.86.112, ptr null, i32 0, i32 1, i32 %1
store ptr %0, ptr %arrayidx.i.us, align 4
call void @llvm.trap()
unreachable
for.end: ; preds = %entry
ret void
}
declare void @llvm.trap() noreturn nounwind