[llvm] [SelectionDAG] Widen even 33-bit-magic udiv on free-zext targets (PR #207634)

MITSUNARI Shigeo via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 21:48:51 PDT 2026


https://github.com/herumi updated https://github.com/llvm/llvm-project/pull/207634

>From dd57073d2a7da809b477c8b2ec2bce3c9c30a40d Mon Sep 17 00:00:00 2001
From: MITSUNARI Shigeo <herumi at nifty.com>
Date: Mon, 6 Jul 2026 13:33:10 +0900
Subject: [PATCH 1/2] [SelectionDAG] Add tests for even 33-bit-magic udiv
 widening

Add test coverage for 32-bit unsigned division by an even constant whose
odd part yields a 33-bit magic number (the GM IsAdd case), on X86,
AArch64 and RISC-V. The CHECK lines capture the current code generation:
the even-divisor rewrite pre-shifts the dividend and divides the odd part
with a 32-bit magic.

A follow-up commit changes the lowering on free-zext targets and updates
these CHECK lines accordingly.
---
 .../AArch64/udiv-const-optimization.ll        |  44 ++++++++
 .../CodeGen/RISCV/udiv-const-optimization.ll  |  16 +++
 .../CodeGen/X86/udiv-const-optimization.ll    | 100 ++++++++++++++++++
 3 files changed, 160 insertions(+)

diff --git a/llvm/test/CodeGen/AArch64/udiv-const-optimization.ll b/llvm/test/CodeGen/AArch64/udiv-const-optimization.ll
index eed677921e764..6f2bcd55fb32e 100644
--- a/llvm/test/CodeGen/AArch64/udiv-const-optimization.ll
+++ b/llvm/test/CodeGen/AArch64/udiv-const-optimization.ll
@@ -59,3 +59,47 @@ define i32 @udiv_by_3(i32 %x) nounwind {
   %div = udiv i32 %x, 3
   ret i32 %div
 }
+
+; Even divisors with 33-bit magic. On AArch64 these use umulh (i32->i64
+; zero-extension is free).
+define i32 @udiv_by_14(i32 %x) nounwind {
+; CHECK-LABEL: udiv_by_14:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    lsr w8, w0, #1
+; CHECK-NEXT:    mov w9, #9363 // =0x2493
+; CHECK-NEXT:    movk w9, #37449, lsl #16
+; CHECK-NEXT:    umull x8, w8, w9
+; CHECK-NEXT:    lsr x0, x8, #34
+; CHECK-NEXT:    // kill: def $w0 killed $w0 killed $x0
+; CHECK-NEXT:    ret
+  %div = udiv i32 %x, 14
+  ret i32 %div
+}
+
+define i32 @udiv_by_38(i32 %x) nounwind {
+; CHECK-LABEL: udiv_by_38:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    lsr w8, w0, #1
+; CHECK-NEXT:    mov w9, #6899 // =0x1af3
+; CHECK-NEXT:    movk w9, #27594, lsl #16
+; CHECK-NEXT:    umull x8, w8, w9
+; CHECK-NEXT:    lsr x0, x8, #35
+; CHECK-NEXT:    // kill: def $w0 killed $w0 killed $x0
+; CHECK-NEXT:    ret
+  %div = udiv i32 %x, 38
+  ret i32 %div
+}
+
+define i32 @udiv_by_214(i32 %x) nounwind {
+; CHECK-LABEL: udiv_by_214:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    lsr w8, w0, #1
+; CHECK-NEXT:    mov w9, #36137 // =0x8d29
+; CHECK-NEXT:    movk w9, #19599, lsl #16
+; CHECK-NEXT:    umull x8, w8, w9
+; CHECK-NEXT:    lsr x0, x8, #37
+; CHECK-NEXT:    // kill: def $w0 killed $w0 killed $x0
+; CHECK-NEXT:    ret
+  %div = udiv i32 %x, 214
+  ret i32 %div
+}
diff --git a/llvm/test/CodeGen/RISCV/udiv-const-optimization.ll b/llvm/test/CodeGen/RISCV/udiv-const-optimization.ll
index f72664587302f..9d9ce34fcec49 100644
--- a/llvm/test/CodeGen/RISCV/udiv-const-optimization.ll
+++ b/llvm/test/CodeGen/RISCV/udiv-const-optimization.ll
@@ -61,3 +61,19 @@ define i32 @udiv_by_3(i32 %x) nounwind {
   %div = udiv i32 %x, 3
   ret i32 %div
 }
+
+; Even divisor with 33-bit magic. On RISC-V the widen path is not used (i32->i64
+; zero-extension is not free); the even-divisor rewrite is kept instead.
+define i32 @udiv_by_14(i32 %x) nounwind {
+; CHECK-LABEL: udiv_by_14:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    lui a1, 299593
+; CHECK-NEXT:    slli a1, a1, 1
+; CHECK-NEXT:    srliw a0, a0, 1
+; CHECK-NEXT:    addi a1, a1, 1171
+; CHECK-NEXT:    mul a0, a0, a1
+; CHECK-NEXT:    srli a0, a0, 34
+; CHECK-NEXT:    ret
+  %div = udiv i32 %x, 14
+  ret i32 %div
+}
diff --git a/llvm/test/CodeGen/X86/udiv-const-optimization.ll b/llvm/test/CodeGen/X86/udiv-const-optimization.ll
index a4fa413bab038..c5317eebe621e 100644
--- a/llvm/test/CodeGen/X86/udiv-const-optimization.ll
+++ b/llvm/test/CodeGen/X86/udiv-const-optimization.ll
@@ -139,3 +139,103 @@ define i32 @udiv_by_3(i32 %x) nounwind {
   %div = udiv i32 %x, 3
   ret i32 %div
 }
+
+; Even divisors with 33-bit magic. On 64-bit targets these use the widened
+; high-multiply path (i32->i64 zero-extension is free here).
+define i32 @udiv_by_14(i32 %x) nounwind {
+; X64-LABEL: udiv_by_14:
+; X64:       # %bb.0:
+; X64-NEXT:    # kill: def $edi killed $edi def $rdi
+; X64-NEXT:    shrl %edi
+; X64-NEXT:    movl $2454267027, %eax # imm = 0x92492493
+; X64-NEXT:    imulq %rdi, %rax
+; X64-NEXT:    shrq $34, %rax
+; X64-NEXT:    # kill: def $eax killed $eax killed $rax
+; X64-NEXT:    retq
+;
+; X64-BMI2-LABEL: udiv_by_14:
+; X64-BMI2:       # %bb.0:
+; X64-BMI2-NEXT:    # kill: def $edi killed $edi def $rdi
+; X64-BMI2-NEXT:    shrl %edi
+; X64-BMI2-NEXT:    movl $2454267027, %eax # imm = 0x92492493
+; X64-BMI2-NEXT:    imulq %rdi, %rax
+; X64-BMI2-NEXT:    shrq $34, %rax
+; X64-BMI2-NEXT:    # kill: def $eax killed $eax killed $rax
+; X64-BMI2-NEXT:    retq
+;
+; X86-LABEL: udiv_by_14:
+; X86:       # %bb.0:
+; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT:    shrl %eax
+; X86-NEXT:    movl ${{-?[0-9]+}}, %ecx # imm = 0x92492493
+; X86-NEXT:    mull %ecx
+; X86-NEXT:    movl %edx, %eax
+; X86-NEXT:    shrl $2, %eax
+; X86-NEXT:    retl
+  %div = udiv i32 %x, 14
+  ret i32 %div
+}
+
+define i32 @udiv_by_38(i32 %x) nounwind {
+; X64-LABEL: udiv_by_38:
+; X64:       # %bb.0:
+; X64-NEXT:    # kill: def $edi killed $edi def $rdi
+; X64-NEXT:    shrl %edi
+; X64-NEXT:    imulq $1808407283, %rdi, %rax # imm = 0x6BCA1AF3
+; X64-NEXT:    shrq $35, %rax
+; X64-NEXT:    # kill: def $eax killed $eax killed $rax
+; X64-NEXT:    retq
+;
+; X64-BMI2-LABEL: udiv_by_38:
+; X64-BMI2:       # %bb.0:
+; X64-BMI2-NEXT:    # kill: def $edi killed $edi def $rdi
+; X64-BMI2-NEXT:    shrl %edi
+; X64-BMI2-NEXT:    imulq $1808407283, %rdi, %rax # imm = 0x6BCA1AF3
+; X64-BMI2-NEXT:    shrq $35, %rax
+; X64-BMI2-NEXT:    # kill: def $eax killed $eax killed $rax
+; X64-BMI2-NEXT:    retq
+;
+; X86-LABEL: udiv_by_38:
+; X86:       # %bb.0:
+; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT:    shrl %eax
+; X86-NEXT:    movl $1808407283, %ecx # imm = 0x6BCA1AF3
+; X86-NEXT:    mull %ecx
+; X86-NEXT:    movl %edx, %eax
+; X86-NEXT:    shrl $3, %eax
+; X86-NEXT:    retl
+  %div = udiv i32 %x, 38
+  ret i32 %div
+}
+
+define i32 @udiv_by_214(i32 %x) nounwind {
+; X64-LABEL: udiv_by_214:
+; X64:       # %bb.0:
+; X64-NEXT:    # kill: def $edi killed $edi def $rdi
+; X64-NEXT:    shrl %edi
+; X64-NEXT:    imulq $1284476201, %rdi, %rax # imm = 0x4C8F8D29
+; X64-NEXT:    shrq $37, %rax
+; X64-NEXT:    # kill: def $eax killed $eax killed $rax
+; X64-NEXT:    retq
+;
+; X64-BMI2-LABEL: udiv_by_214:
+; X64-BMI2:       # %bb.0:
+; X64-BMI2-NEXT:    # kill: def $edi killed $edi def $rdi
+; X64-BMI2-NEXT:    shrl %edi
+; X64-BMI2-NEXT:    imulq $1284476201, %rdi, %rax # imm = 0x4C8F8D29
+; X64-BMI2-NEXT:    shrq $37, %rax
+; X64-BMI2-NEXT:    # kill: def $eax killed $eax killed $rax
+; X64-BMI2-NEXT:    retq
+;
+; X86-LABEL: udiv_by_214:
+; X86:       # %bb.0:
+; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT:    shrl %eax
+; X86-NEXT:    movl $1284476201, %ecx # imm = 0x4C8F8D29
+; X86-NEXT:    mull %ecx
+; X86-NEXT:    movl %edx, %eax
+; X86-NEXT:    shrl $5, %eax
+; X86-NEXT:    retl
+  %div = udiv i32 %x, 214
+  ret i32 %div
+}

>From 0b040bcd67bbd39e9730c053f4c18d34c229ad9e Mon Sep 17 00:00:00 2001
From: MITSUNARI Shigeo <herumi at nifty.com>
Date: Mon, 6 Jul 2026 13:34:21 +0900
Subject: [PATCH 2/2] [SelectionDAG] Widen even 33-bit-magic udiv on free-zext
 targets

Follow-up to #181288, which lowers a 32-bit unsigned division by a
constant with a 33-bit magic number (IsAdd) to a widened 64-bit
high-multiply (MULHU/UMUL_LOHI) on 64-bit targets. That patch only
reached odd divisors: for an even divisor the even-divisor rewrite in
UnsignedDivisionByConstantInfo::get() fires first, pre-shifting the
dividend and dividing by the odd part with a 32-bit magic, so the
widened path is never used.

On targets that zero-extend i32 to i64 for free (x86-64 mul/mulx,
AArch64 umulh) the widened path is a single high-multiply and beats the
even-divisor rewrite, which needs an extra shift. BuildUDIV now
suppresses the even-divisor rewrite for those targets by keying on
isZExtFree(i32, i64), so even divisors use the widened path too. Where
the extension is not free (e.g. RISC-V) the even-divisor rewrite is
kept and code generation is unchanged.

The decision is made in the caller; UnsignedDivisionByConstantInfo::get()
is unchanged and its two permission flags stay independent.
---
 .../CodeGen/SelectionDAG/TargetLowering.cpp   |  8 +++-
 .../AArch64/udiv-const-optimization.ll        | 30 ++++++------
 llvm/test/CodeGen/X86/divide-by-constant.ll   |  8 ++--
 .../CodeGen/X86/udiv-const-optimization.ll    | 47 +++++++++----------
 4 files changed, 47 insertions(+), 46 deletions(-)

diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index a4bcc8cb01126..e5a0eff12b94a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -6921,6 +6921,12 @@ SDValue TargetLowering::BuildUDIV(SDNode *N, SelectionDAG &DAG,
       isOperationLegalOrCustom(ISD::UMUL_LOHI, WideSVT, IsAfterLegalization);
   const bool AllowWiden = (HasWideMULHU || HasWideUMUL_LOHI);
 
+  // For even divisors with a 33-bit magic number, the widened high-multiply
+  // path is only worthwhile over the even-divisor rewrite on targets that
+  // zero-extend i32 to i64 for free (e.g. x86-64 and AArch64). Elsewhere (e.g.
+  // RISC-V) keep the even-divisor rewrite, which avoids the explicit extension.
+  const bool AllowEvenToWiden = AllowWiden && isZExtFree(MVT::i32, WideSVT);
+
   bool UseNPQ = false, UsePreShift = false, UsePostShift = false;
   bool UseWiden = false;
   SmallVector<SDValue, 16> PreShifts, PostShifts, MagicFactors, NPQFactors;
@@ -6943,7 +6949,7 @@ SDValue TargetLowering::BuildUDIV(SDNode *N, SelectionDAG &DAG,
       UnsignedDivisionByConstantInfo magics =
           UnsignedDivisionByConstantInfo::get(
               Divisor, std::min(KnownLeadingZeros, Divisor.countl_zero()),
-              /*AllowEvenDivisorOptimization=*/true,
+              /*AllowEvenDivisorOptimization=*/!AllowEvenToWiden,
               /*AllowWidenOptimization=*/AllowWiden);
 
       if (magics.Widen) {
diff --git a/llvm/test/CodeGen/AArch64/udiv-const-optimization.ll b/llvm/test/CodeGen/AArch64/udiv-const-optimization.ll
index 6f2bcd55fb32e..9cba7c55dc108 100644
--- a/llvm/test/CodeGen/AArch64/udiv-const-optimization.ll
+++ b/llvm/test/CodeGen/AArch64/udiv-const-optimization.ll
@@ -65,11 +65,11 @@ define i32 @udiv_by_3(i32 %x) nounwind {
 define i32 @udiv_by_14(i32 %x) nounwind {
 ; CHECK-LABEL: udiv_by_14:
 ; CHECK:       // %bb.0:
-; CHECK-NEXT:    lsr w8, w0, #1
-; CHECK-NEXT:    mov w9, #9363 // =0x2493
-; CHECK-NEXT:    movk w9, #37449, lsl #16
-; CHECK-NEXT:    umull x8, w8, w9
-; CHECK-NEXT:    lsr x0, x8, #34
+; CHECK-NEXT:    mov x8, #1342177280 // =0x50000000
+; CHECK-NEXT:    mov w9, w0
+; CHECK-NEXT:    movk x8, #9362, lsl #32
+; CHECK-NEXT:    movk x8, #4681, lsl #48
+; CHECK-NEXT:    umulh x0, x9, x8
 ; CHECK-NEXT:    // kill: def $w0 killed $w0 killed $x0
 ; CHECK-NEXT:    ret
   %div = udiv i32 %x, 14
@@ -79,11 +79,11 @@ define i32 @udiv_by_14(i32 %x) nounwind {
 define i32 @udiv_by_38(i32 %x) nounwind {
 ; CHECK-LABEL: udiv_by_38:
 ; CHECK:       // %bb.0:
-; CHECK-NEXT:    lsr w8, w0, #1
-; CHECK-NEXT:    mov w9, #6899 // =0x1af3
-; CHECK-NEXT:    movk w9, #27594, lsl #16
-; CHECK-NEXT:    umull x8, w8, w9
-; CHECK-NEXT:    lsr x0, x8, #35
+; CHECK-NEXT:    mov x8, #738197504 // =0x2c000000
+; CHECK-NEXT:    mov w9, w0
+; CHECK-NEXT:    movk x8, #41391, lsl #32
+; CHECK-NEXT:    movk x8, #1724, lsl #48
+; CHECK-NEXT:    umulh x0, x9, x8
 ; CHECK-NEXT:    // kill: def $w0 killed $w0 killed $x0
 ; CHECK-NEXT:    ret
   %div = udiv i32 %x, 38
@@ -93,11 +93,11 @@ define i32 @udiv_by_38(i32 %x) nounwind {
 define i32 @udiv_by_214(i32 %x) nounwind {
 ; CHECK-LABEL: udiv_by_214:
 ; CHECK:       // %bb.0:
-; CHECK-NEXT:    lsr w8, w0, #1
-; CHECK-NEXT:    mov w9, #36137 // =0x8d29
-; CHECK-NEXT:    movk w9, #19599, lsl #16
-; CHECK-NEXT:    umull x8, w8, w9
-; CHECK-NEXT:    lsr x0, x8, #37
+; CHECK-NEXT:    mov x8, #2734686208 // =0xa3000000
+; CHECK-NEXT:    mov w9, w0
+; CHECK-NEXT:    movk x8, #15924, lsl #32
+; CHECK-NEXT:    movk x8, #306, lsl #48
+; CHECK-NEXT:    umulh x0, x9, x8
 ; CHECK-NEXT:    // kill: def $w0 killed $w0 killed $x0
 ; CHECK-NEXT:    ret
   %div = udiv i32 %x, 214
diff --git a/llvm/test/CodeGen/X86/divide-by-constant.ll b/llvm/test/CodeGen/X86/divide-by-constant.ll
index d9e19df39f6b6..6a692e3c98b73 100644
--- a/llvm/test/CodeGen/X86/divide-by-constant.ll
+++ b/llvm/test/CodeGen/X86/divide-by-constant.ll
@@ -148,10 +148,10 @@ define i32 @test7(i32 %x) nounwind {
 ;
 ; X64-LABEL: test7:
 ; X64:       # %bb.0:
-; X64-NEXT:    # kill: def $edi killed $edi def $rdi
-; X64-NEXT:    shrl $2, %edi
-; X64-NEXT:    imulq $613566757, %rdi, %rax # imm = 0x24924925
-; X64-NEXT:    shrq $32, %rax
+; X64-NEXT:    movl %edi, %eax
+; X64-NEXT:    movabsq $658812288404291584, %rcx # imm = 0x924924928000000
+; X64-NEXT:    mulq %rcx
+; X64-NEXT:    movq %rdx, %rax
 ; X64-NEXT:    # kill: def $eax killed $eax killed $rax
 ; X64-NEXT:    retq
   %div = udiv i32 %x, 28
diff --git a/llvm/test/CodeGen/X86/udiv-const-optimization.ll b/llvm/test/CodeGen/X86/udiv-const-optimization.ll
index c5317eebe621e..1acbc50a80909 100644
--- a/llvm/test/CodeGen/X86/udiv-const-optimization.ll
+++ b/llvm/test/CodeGen/X86/udiv-const-optimization.ll
@@ -145,21 +145,18 @@ define i32 @udiv_by_3(i32 %x) nounwind {
 define i32 @udiv_by_14(i32 %x) nounwind {
 ; X64-LABEL: udiv_by_14:
 ; X64:       # %bb.0:
-; X64-NEXT:    # kill: def $edi killed $edi def $rdi
-; X64-NEXT:    shrl %edi
-; X64-NEXT:    movl $2454267027, %eax # imm = 0x92492493
-; X64-NEXT:    imulq %rdi, %rax
-; X64-NEXT:    shrq $34, %rax
+; X64-NEXT:    movl %edi, %eax
+; X64-NEXT:    movabsq $1317624576808583168, %rcx # imm = 0x1249249250000000
+; X64-NEXT:    mulq %rcx
+; X64-NEXT:    movq %rdx, %rax
 ; X64-NEXT:    # kill: def $eax killed $eax killed $rax
 ; X64-NEXT:    retq
 ;
 ; X64-BMI2-LABEL: udiv_by_14:
 ; X64-BMI2:       # %bb.0:
-; X64-BMI2-NEXT:    # kill: def $edi killed $edi def $rdi
-; X64-BMI2-NEXT:    shrl %edi
-; X64-BMI2-NEXT:    movl $2454267027, %eax # imm = 0x92492493
-; X64-BMI2-NEXT:    imulq %rdi, %rax
-; X64-BMI2-NEXT:    shrq $34, %rax
+; X64-BMI2-NEXT:    movl %edi, %edx
+; X64-BMI2-NEXT:    movabsq $1317624576808583168, %rax # imm = 0x1249249250000000
+; X64-BMI2-NEXT:    mulxq %rax, %rax, %rax
 ; X64-BMI2-NEXT:    # kill: def $eax killed $eax killed $rax
 ; X64-BMI2-NEXT:    retq
 ;
@@ -179,19 +176,18 @@ define i32 @udiv_by_14(i32 %x) nounwind {
 define i32 @udiv_by_38(i32 %x) nounwind {
 ; X64-LABEL: udiv_by_38:
 ; X64:       # %bb.0:
-; X64-NEXT:    # kill: def $edi killed $edi def $rdi
-; X64-NEXT:    shrl %edi
-; X64-NEXT:    imulq $1808407283, %rdi, %rax # imm = 0x6BCA1AF3
-; X64-NEXT:    shrq $35, %rax
+; X64-NEXT:    movl %edi, %eax
+; X64-NEXT:    movabsq $485440633578717184, %rcx # imm = 0x6BCA1AF2C000000
+; X64-NEXT:    mulq %rcx
+; X64-NEXT:    movq %rdx, %rax
 ; X64-NEXT:    # kill: def $eax killed $eax killed $rax
 ; X64-NEXT:    retq
 ;
 ; X64-BMI2-LABEL: udiv_by_38:
 ; X64-BMI2:       # %bb.0:
-; X64-BMI2-NEXT:    # kill: def $edi killed $edi def $rdi
-; X64-BMI2-NEXT:    shrl %edi
-; X64-BMI2-NEXT:    imulq $1808407283, %rdi, %rax # imm = 0x6BCA1AF3
-; X64-BMI2-NEXT:    shrq $35, %rax
+; X64-BMI2-NEXT:    movl %edi, %edx
+; X64-BMI2-NEXT:    movabsq $485440633578717184, %rax # imm = 0x6BCA1AF2C000000
+; X64-BMI2-NEXT:    mulxq %rax, %rax, %rax
 ; X64-BMI2-NEXT:    # kill: def $eax killed $eax killed $rax
 ; X64-BMI2-NEXT:    retq
 ;
@@ -211,19 +207,18 @@ define i32 @udiv_by_38(i32 %x) nounwind {
 define i32 @udiv_by_214(i32 %x) nounwind {
 ; X64-LABEL: udiv_by_214:
 ; X64:       # %bb.0:
-; X64-NEXT:    # kill: def $edi killed $edi def $rdi
-; X64-NEXT:    shrl %edi
-; X64-NEXT:    imulq $1284476201, %rdi, %rax # imm = 0x4C8F8D29
-; X64-NEXT:    shrq $37, %rax
+; X64-NEXT:    movl %edi, %eax
+; X64-NEXT:    movabsq $86199738667368448, %rcx # imm = 0x1323E34A3000000
+; X64-NEXT:    mulq %rcx
+; X64-NEXT:    movq %rdx, %rax
 ; X64-NEXT:    # kill: def $eax killed $eax killed $rax
 ; X64-NEXT:    retq
 ;
 ; X64-BMI2-LABEL: udiv_by_214:
 ; X64-BMI2:       # %bb.0:
-; X64-BMI2-NEXT:    # kill: def $edi killed $edi def $rdi
-; X64-BMI2-NEXT:    shrl %edi
-; X64-BMI2-NEXT:    imulq $1284476201, %rdi, %rax # imm = 0x4C8F8D29
-; X64-BMI2-NEXT:    shrq $37, %rax
+; X64-BMI2-NEXT:    movl %edi, %edx
+; X64-BMI2-NEXT:    movabsq $86199738667368448, %rax # imm = 0x1323E34A3000000
+; X64-BMI2-NEXT:    mulxq %rax, %rax, %rax
 ; X64-BMI2-NEXT:    # kill: def $eax killed $eax killed $rax
 ; X64-BMI2-NEXT:    retq
 ;



More information about the llvm-commits mailing list