[llvm] [Hexagon/LoopIdiom] Protect test against O2 changes (PR #144734)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 08:51:28 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-hexagon
Author: Ramkumar Ramachandra (artagnon)
<details>
<summary>Changes</summary>
Protect the pmpy-mod.ll test against O2 pipeline changes, by changing the opt invocation to call exactly the prerequisite passes before calling hexagon-loop-idiom. The context for this change is that a HashRecognize analysis was recently added to LLVM, and the optimization of CRC loops will soon be enabled by default, which would cause pmpy-mod.ll to fail, since the CRC loop would be optimized by a table-lookup before HexagonLoopIdiom has a chance to optimize it using pmpy instructions. HexagonLoopIdiom should probably be removed in the future, preferring the generic middle-end optimization performed by using HashRecognize.
-- 8< --
See https://github.com/llvm/llvm-project/pull/143208.
---
Full diff: https://github.com/llvm/llvm-project/pull/144734.diff
1 Files Affected:
- (modified) llvm/test/CodeGen/Hexagon/loop-idiom/pmpy-mod.ll (+2-6)
``````````diff
diff --git a/llvm/test/CodeGen/Hexagon/loop-idiom/pmpy-mod.ll b/llvm/test/CodeGen/Hexagon/loop-idiom/pmpy-mod.ll
index 836a0e110b9e0..e4ab9b131e749 100644
--- a/llvm/test/CodeGen/Hexagon/loop-idiom/pmpy-mod.ll
+++ b/llvm/test/CodeGen/Hexagon/loop-idiom/pmpy-mod.ll
@@ -1,9 +1,5 @@
-; Run -O2 to make sure that all the usual optimizations do happen before
-; the Hexagon loop idiom recognition runs. This is to check that we still
-; get this opportunity regardless of what happens before.
-
-; RUN: opt -O2 -S < %s | FileCheck %s
-; RUN: opt -passes='default<O2>' -S < %s | FileCheck %s
+; RUN: opt -p 'instcombine,simplifycfg,loop-rotate,loop(hexagon-loop-idiom)' \
+; RUN: -S %s | FileCheck %s
target triple = "hexagon"
target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
``````````
</details>
https://github.com/llvm/llvm-project/pull/144734
More information about the llvm-commits
mailing list