[llvm] [RISCV][VLOPT] Don't reduce the VL is the same as CommonVL (PR #123878)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 08:27:54 PST 2025


================
@@ -150,3 +150,26 @@ define <vscale x 4 x i32> @dont_optimize_tied_def(<vscale x 4 x i32> %a, <vscale
   ret <vscale x 4 x i32> %2
 }
 
+define <vscale x 4 x i32> @same_vl_imm(<vscale x 4 x i32> %passthru, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
----------------
lukel97 wrote:

I want to confirm that the issue filed in #123862 isn't an infinite loop but a symptom of some polynomial complexity.

If an input is a phi then we'll bail because it's not a vector pseudo. I guess self referencing instructions are still possible but I don't think that's what we were seeing. (We should still add a test case and protect against them though)

https://github.com/llvm/llvm-project/pull/123878


More information about the llvm-commits mailing list