[llvm] [RISCV] Combine vXi32 (mul (and (lshr X, 15), 0x10001), 0xffff) -> (bitcast (sra (v2Xi16 (bitcast X)), 15)) (PR #93565)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 12:38:16 PDT 2024


================
@@ -13704,6 +13704,44 @@ static SDValue expandMul(SDNode *N, SelectionDAG &DAG,
   return SDValue();
 }
 
+// Combine vXi32 (mul (and (lshr X, 15), 0x10001), 0xffff) ->
----------------
topperc wrote:

>  At that point, I think the lshr/shl pair fold in this case.

I don't think they would since there would be a bitcast between them.

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


More information about the llvm-commits mailing list