Skip to content

Commit c093d13

Browse files
committed
[Hexagon/LoopIdiom] Protect test against O2 changes
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.
1 parent 40d2f39 commit c093d13

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

llvm/test/CodeGen/Hexagon/loop-idiom/pmpy-mod.ll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
; Run -O2 to make sure that all the usual optimizations do happen before
2-
; the Hexagon loop idiom recognition runs. This is to check that we still
3-
; get this opportunity regardless of what happens before.
4-
5-
; RUN: opt -O2 -S < %s | FileCheck %s
6-
; RUN: opt -passes='default<O2>' -S < %s | FileCheck %s
1+
; RUN: opt -p 'instcombine,simplifycfg,loop-rotate,loop(hexagon-loop-idiom)' \
2+
; RUN: -S %s | FileCheck %s
73

84
target triple = "hexagon"
95
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"

0 commit comments

Comments
 (0)