aports/testing/llvm21/hexagon.patch
2025-07-19 16:26:06 +02:00

178 lines
7.4 KiB
Diff

FAIL: LLVM :: CodeGen/Hexagon/hexagon-strcpy.ll (13273 of 59975)
******************** TEST 'LLVM :: CodeGen/Hexagon/hexagon-strcpy.ll' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
/builds/alpine/aports/testing/llvm21/src/llvm-project-21.1.0-rc1.src/build/bin/llc -march=hexagon -verify-machineinstrs < /builds/alpine/aports/testing/llvm21/src/llvm-project-21.1.0-rc1.src/llvm/test/CodeGen/Hexagon/hexagon-strcpy.ll | /builds/alpine/aports/testing/llvm21/src/llvm-project-21.1.0-rc1.src/build/bin/FileCheck /builds/alpine/aports/testing/llvm21/src/llvm-project-21.1.0-rc1.src/llvm/test/CodeGen/Hexagon/hexagon-strcpy.ll # RUN: at line 2
+ /builds/alpine/aports/testing/llvm21/src/llvm-project-21.1.0-rc1.src/build/bin/llc -march=hexagon -verify-machineinstrs
+ /builds/alpine/aports/testing/llvm21/src/llvm-project-21.1.0-rc1.src/build/bin/FileCheck /builds/alpine/aports/testing/llvm21/src/llvm-project-21.1.0-rc1.src/llvm/test/CodeGen/Hexagon/hexagon-strcpy.ll
/builds/alpine/aports/testing/llvm21/src/llvm-project-21.1.0-rc1.src/llvm/test/CodeGen/Hexagon/hexagon-strcpy.ll:15:15: error: CHECK-NEXT: is not on the line after the previous match
; CHECK-NEXT: .cfi_def_cfa r30, 8
^
<stdin>:16:2: note: 'next' match was here
.cfi_def_cfa r30, 8
^
<stdin>:10:20: note: previous match ended here
// %bb.0: // %entry
^
<stdin>:11:1: note: non-matching line after previous match is here
{
^
Input file: <stdin>
Check file: /builds/alpine/aports/testing/llvm21/src/llvm-project-21.1.0-rc1.src/llvm/test/CodeGen/Hexagon/hexagon-strcpy.ll
-dump-input=help explains the following input dump.
Input was:
<<<<<<
.
.
.
11: {
12: r0 = ##.L.str1
13: r3:2 = CONST64(#2325073635944967245)
14: allocframe(r29,#32):raw
15: }
16: .cfi_def_cfa r30, 8
next:15 !~~~~~~~~~~~~~~~~~~ error: match on wrong line
17: .cfi_offset r31, -4
18: .cfi_offset r30, -8
19: {
20: r1 = add(r29,#0)
21: r5:4 = CONST64(#4706902966564560965)
.
.
.
>>>>>>
---
From 9ae5ef0cc8c083a3718a5f4b3d5c1e78f03aac1e Mon Sep 17 00:00:00 2001
From: fossdd <fossdd@pwned.life>
Date: Sat, 19 Jul 2025 10:13:54 +0200
Subject: [PATCH] Revert "[Hexagon] Implement shouldConvertConstantLoadToIntImm
(#146452)"
This reverts commit 15ab4bb5c8a7165762d0d3725828f3d511075225.
Signed-off-by: fossdd <fossdd@pwned.life>
---
.../Target/Hexagon/HexagonISelLowering.cpp | 16 ------
llvm/lib/Target/Hexagon/HexagonISelLowering.h | 5 --
llvm/test/CodeGen/Hexagon/hexagon-strcpy.ll | 57 -------------------
3 files changed, 78 deletions(-)
delete mode 100644 llvm/test/CodeGen/Hexagon/hexagon-strcpy.ll
diff --git a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
index facea646d4b6..e0ccfb4ff223 100644
--- a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
@@ -102,10 +102,6 @@ static cl::opt<int>
MaxStoresPerMemsetOptSizeCL("max-store-memset-Os", cl::Hidden, cl::init(4),
cl::desc("Max #stores to inline memset"));
-static cl::opt<bool>
- ConstantLoadsToImm("constant-loads-to-imm", cl::Hidden, cl::init(true),
- cl::desc("Convert constant loads to immediate values."));
-
static cl::opt<bool> AlignLoads("hexagon-align-loads",
cl::Hidden, cl::init(false),
cl::desc("Rewrite unaligned loads as a pair of aligned loads"));
@@ -3698,18 +3694,6 @@ bool HexagonTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT,
return true;
}
-/// Returns true if it is beneficial to convert a load of a constant
-/// to just the constant itself.
-bool HexagonTargetLowering::shouldConvertConstantLoadToIntImm(const APInt &Imm,
- Type *Ty) const {
- if (!ConstantLoadsToImm)
- return false;
-
- assert(Ty->isIntegerTy());
- unsigned BitSize = Ty->getPrimitiveSizeInBits();
- return (BitSize > 0 && BitSize <= 64);
-}
-
/// isLegalAddressingMode - Return true if the addressing mode represented by
/// AM is legal for this target, for a load/store of the specified type.
bool HexagonTargetLowering::isLegalAddressingMode(const DataLayout &DL,
diff --git a/llvm/lib/Target/Hexagon/HexagonISelLowering.h b/llvm/lib/Target/Hexagon/HexagonISelLowering.h
index 9ebbbc6399b4..925e19e0b2ed 100644
--- a/llvm/lib/Target/Hexagon/HexagonISelLowering.h
+++ b/llvm/lib/Target/Hexagon/HexagonISelLowering.h
@@ -356,11 +356,6 @@ public:
SDValue getPICJumpTableRelocBase(SDValue Table, SelectionDAG &DAG)
const override;
- /// Returns true if it is beneficial to convert a load of a constant
- /// to just the constant itself.
- bool shouldConvertConstantLoadToIntImm(const APInt &Imm,
- Type *Ty) const override;
-
bool shouldReduceLoadWidth(SDNode *Load, ISD::LoadExtType ExtTy, EVT NewVT,
std::optional<unsigned> ByteOffset) const override;
diff --git a/llvm/test/CodeGen/Hexagon/hexagon-strcpy.ll b/llvm/test/CodeGen/Hexagon/hexagon-strcpy.ll
deleted file mode 100644
index b23366bc11ac..000000000000
--- a/llvm/test/CodeGen/Hexagon/hexagon-strcpy.ll
+++ /dev/null
@@ -1,57 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
-; RUN: llc -march=hexagon -verify-machineinstrs < %s | FileCheck %s
-
-@.str = private unnamed_addr constant [31 x i8] c"DHRYSTONE PROGRAM, 3'RD STRING\00", align 1
-@.str1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
-
-; Function Attrs: nounwind
-declare i32 @printf(i8* nocapture readonly, ...)
-
-; Function Attrs: nounwind
-define i32 @main() {
-; CHECK-LABEL: main:
-; CHECK: .cfi_startproc
-; CHECK-NEXT: // %bb.0: // %entry
-; CHECK-NEXT: .cfi_def_cfa r30, 8
-; CHECK-NEXT: .cfi_offset r31, -4
-; CHECK-NEXT: .cfi_offset r30, -8
-; CHECK-NEXT: {
-; CHECK-NEXT: r0 = ##.L.str1
-; CHECK-NEXT: r3:2 = CONST64(#2325073635944967245)
-; CHECK-NEXT: allocframe(r29,#40):raw
-; CHECK-NEXT: }
-; CHECK-NEXT: {
-; CHECK-NEXT: r1 = add(r29,#8)
-; CHECK-NEXT: r7:6 = CONST64(#4706902966564560965)
-; CHECK-NEXT: r5:4 = CONST64(#5642821575076104260)
-; CHECK-NEXT: }
-; CHECK-NEXT: {
-; CHECK-NEXT: memb(r29+#38) = #0
-; CHECK-NEXT: memw(r29+#0) = r1
-; CHECK-NEXT: }
-; CHECK-NEXT: {
-; CHECK-NEXT: memd(r29+#24) = r3:2
-; CHECK-NEXT: memd(r29+#16) = r7:6
-; CHECK-NEXT: }
-; CHECK-NEXT: {
-; CHECK-NEXT: memd(r29+#8) = r5:4
-; CHECK-NEXT: memh(r29+#36) = ##18254
-; CHECK-NEXT: }
-; CHECK-NEXT: {
-; CHECK-NEXT: call printf
-; CHECK-NEXT: memw(r29+#32) = ##1230132307
-; CHECK-NEXT: }
-; CHECK-NEXT: {
-; CHECK-NEXT: r0 = #0
-; CHECK-NEXT: dealloc_return
-; CHECK-NEXT: }
-entry:
- %blah = alloca [30 x i8], align 8
- %arraydecay = getelementptr inbounds [30 x i8], [30 x i8]* %blah, i32 0, i32 0
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %arraydecay, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i32 0, i32 0), i32 31, i32 1, i1 false)
- %call2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str1, i32 0, i32 0), i8* %arraydecay)
- ret i32 0
-}
-
-; Function Attrs: nounwind
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1)
--
2.50.1