[llvm] [RISCV] Adjust LMUL if not used to avoid VL toggle (PR #69259)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 15:13:34 PDT 2023


================
@@ -65,9 +65,8 @@ define <32 x i32> @insertelt_v32i32_31(<32 x i32> %a, i32 %y) {
 ; CHECK-LABEL: insertelt_v32i32_31:
 ; CHECK:       # %bb.0:
 ; CHECK-NEXT:    li a1, 32
-; CHECK-NEXT:    vsetvli zero, a1, e32, m1, ta, ma
-; CHECK-NEXT:    vmv.s.x v16, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e32, m8, ta, ma
----------------
lukel97 wrote:

Good point, I'm not quite sure why this part wasn't already caught since it should just be an entire VTYPE substitution.
Note to self though, this is one of the cases the forward-pass-ratio-mutation in #69788 won't catch because it's the first instruction in the BB

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


More information about the llvm-commits mailing list