[llvm] [LLVM][Reassociate] Extend ConvertShiftToMul to allow for ConstantInt vectors. (PR #137340)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 05:22:32 PDT 2025


================
@@ -370,10 +371,15 @@ define <2 x double> @test11_reassoc(<2 x double> %x, <2 x double> %y) {
 ; FIXME: shifts should be converted to mul to assist further reassociation.
 
 define <2 x i64> @test12(<2 x i64> %b, <2 x i64> %c) {
-; CHECK-LABEL: @test12(
-; CHECK-NEXT:    [[MUL:%.*]] = mul <2 x i64> [[C:%.*]], [[B:%.*]]
-; CHECK-NEXT:    [[SHL:%.*]] = shl <2 x i64> [[MUL]], splat (i64 5)
-; CHECK-NEXT:    ret <2 x i64> [[SHL]]
+; CHECK-CV-LABEL: @test12(
----------------
paulwalker-arm wrote:

The comment is still relevant when using the default flags (i.e. nobody is likely to see the "fixed" output yet) so I figured it's better to keep the comment until the new code paths become the default.

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


More information about the llvm-commits mailing list