[llvm] apply mulx optimization for two-wide mul instruction (mull, mulq) (PR #185127)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 7 05:32:32 PST 2026


================
@@ -0,0 +1,45 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=-bmi2 | FileCheck %s
+;
+; For UMUL_LOHI lowering without BMI2, MUL/IMUL use RAX as an implicit source.
+; If one operand already lives in RAX (e.g. call result), avoid shuffling it out
+; and back before the multiply.
+
+declare i32 @foo32()
+declare i64 @foo64()
+
+define i32 @mul32_no_implicit_copy(i32 %a0) {
----------------
phoebewang wrote:

Add `nounwind` to remove cfi directives.

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


More information about the llvm-commits mailing list