[llvm] r359886 - [X86] Add X64 common prefixes and regenerate mul i64 tests
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri May 3 07:07:39 PDT 2019
Author: rksimon
Date: Fri May 3 07:07:38 2019
New Revision: 359886
URL: http://llvm.org/viewvc/llvm-project?rev=359886&view=rev
Log:
[X86] Add X64 common prefixes and regenerate mul i64 tests
Noticed while reviewing D61472
Modified:
llvm/trunk/test/CodeGen/X86/mul-constant-i64.ll
Modified: llvm/trunk/test/CodeGen/X86/mul-constant-i64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/mul-constant-i64.ll?rev=359886&r1=359885&r2=359886&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/mul-constant-i64.ll (original)
+++ llvm/trunk/test/CodeGen/X86/mul-constant-i64.ll Fri May 3 07:07:38 2019
@@ -1,12 +1,12 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s --check-prefixes=X86
-; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=haswell | FileCheck %s --check-prefixes=X64-OPT,X64-HSW
-; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=btver2 | FileCheck %s --check-prefixes=X64-OPT,X64-JAG
-; RUN: llc < %s -mtriple=i686-unknown -mul-constant-optimization=false | FileCheck %s --check-prefix=X86-NOOPT
-; RUN: llc < %s -mtriple=x86_64-unknown -mul-constant-optimization=false -mcpu=haswell | FileCheck %s --check-prefixes=X64-NOOPT,HSW-NOOPT
-; RUN: llc < %s -mtriple=x86_64-unknown -mul-constant-optimization=false -mcpu=btver2 | FileCheck %s --check-prefixes=X64-NOOPT,JAG-NOOPT
-; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=slm | FileCheck %s --check-prefixes=X64-OPT,X64-SLM
-; RUN: llc < %s -mtriple=x86_64-unknown -mul-constant-optimization=false -mcpu=slm | FileCheck %s --check-prefixes=X64-NOOPT,SLM-NOOPT
+; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s --check-prefixes=X86
+; RUN: llc < %s -mtriple=i686-unknown -mul-constant-optimization=false | FileCheck %s --check-prefixes=X86-NOOPT
+; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=haswell | FileCheck %s --check-prefixes=X64,X64-OPT,X64-HSW
+; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=btver2 | FileCheck %s --check-prefixes=X64,X64-OPT,X64-JAG
+; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=slm | FileCheck %s --check-prefixes=X64,X64-OPT,X64-SLM
+; RUN: llc < %s -mtriple=x86_64-unknown -mul-constant-optimization=false -mcpu=haswell | FileCheck %s --check-prefixes=X64,X64-NOOPT,X64-HSW-NOOPT
+; RUN: llc < %s -mtriple=x86_64-unknown -mul-constant-optimization=false -mcpu=btver2 | FileCheck %s --check-prefixes=X64,X64-NOOPT,X64-JAG-NOOPT
+; RUN: llc < %s -mtriple=x86_64-unknown -mul-constant-optimization=false -mcpu=slm | FileCheck %s --check-prefixes=X64,X64-NOOPT,X64-SLM-NOOPT
define i64 @test_mul_by_1(i64 %x) nounwind {
; X86-LABEL: test_mul_by_1:
@@ -15,21 +15,16 @@ define i64 @test_mul_by_1(i64 %x) nounwi
; X86-NEXT: movl {{[0-9]+}}(%esp), %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_1:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: movq %rdi, %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_1:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-NOOPT-NEXT: movl {{[0-9]+}}(%esp), %edx
; X86-NOOPT-NEXT: retl
;
-; X64-NOOPT-LABEL: test_mul_by_1:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: movq %rdi, %rax
-; X64-NOOPT-NEXT: retq
+; X64-LABEL: test_mul_by_1:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: retq
%mul = mul nsw i64 %x, 1
ret i64 %mul
}
@@ -43,11 +38,6 @@ define i64 @test_mul_by_2(i64 %x) {
; X86-NEXT: addl %eax, %eax
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_2:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: leaq (%rdi,%rdi), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_2:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -56,10 +46,10 @@ define i64 @test_mul_by_2(i64 %x) {
; X86-NOOPT-NEXT: addl %eax, %eax
; X86-NOOPT-NEXT: retl
;
-; X64-NOOPT-LABEL: test_mul_by_2:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: leaq (%rdi,%rdi), %rax
-; X64-NOOPT-NEXT: retq
+; X64-LABEL: test_mul_by_2:
+; X64: # %bb.0:
+; X64-NEXT: leaq (%rdi,%rdi), %rax
+; X64-NEXT: retq
%mul = mul nsw i64 %x, 2
ret i64 %mul
}
@@ -74,11 +64,6 @@ define i64 @test_mul_by_3(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_3:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: leaq (%rdi,%rdi,2), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_3:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $3, %eax
@@ -87,10 +72,10 @@ define i64 @test_mul_by_3(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
-; X64-NOOPT-LABEL: test_mul_by_3:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: leaq (%rdi,%rdi,2), %rax
-; X64-NOOPT-NEXT: retq
+; X64-LABEL: test_mul_by_3:
+; X64: # %bb.0:
+; X64-NEXT: leaq (%rdi,%rdi,2), %rax
+; X64-NEXT: retq
%mul = mul nsw i64 %x, 3
ret i64 %mul
}
@@ -104,11 +89,6 @@ define i64 @test_mul_by_4(i64 %x) {
; X86-NEXT: shll $2, %eax
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_4:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: leaq (,%rdi,4), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_4:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -117,10 +97,10 @@ define i64 @test_mul_by_4(i64 %x) {
; X86-NOOPT-NEXT: shll $2, %eax
; X86-NOOPT-NEXT: retl
;
-; X64-NOOPT-LABEL: test_mul_by_4:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: leaq (,%rdi,4), %rax
-; X64-NOOPT-NEXT: retq
+; X64-LABEL: test_mul_by_4:
+; X64: # %bb.0:
+; X64-NEXT: leaq (,%rdi,4), %rax
+; X64-NEXT: retq
%mul = mul nsw i64 %x, 4
ret i64 %mul
}
@@ -135,11 +115,6 @@ define i64 @test_mul_by_5(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_5:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_5:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $5, %eax
@@ -148,10 +123,10 @@ define i64 @test_mul_by_5(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
-; X64-NOOPT-LABEL: test_mul_by_5:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: leaq (%rdi,%rdi,4), %rax
-; X64-NOOPT-NEXT: retq
+; X64-LABEL: test_mul_by_5:
+; X64: # %bb.0:
+; X64-NEXT: leaq (%rdi,%rdi,4), %rax
+; X64-NEXT: retq
%mul = mul nsw i64 %x, 5
ret i64 %mul
}
@@ -166,12 +141,6 @@ define i64 @test_mul_by_6(i64 %x) {
; X86-NEXT: leal (%edx,%ecx,2), %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_6:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: addq %rdi, %rdi
-; X64-OPT-NEXT: leaq (%rdi,%rdi,2), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_6:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $6, %eax
@@ -180,6 +149,12 @@ define i64 @test_mul_by_6(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_6:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: addq %rdi, %rdi
+; X64-OPT-NEXT: leaq (%rdi,%rdi,2), %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_6:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $6, %rdi, %rax
@@ -199,12 +174,6 @@ define i64 @test_mul_by_7(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_7:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: leaq (,%rdi,8), %rax
-; X64-OPT-NEXT: subq %rdi, %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_7:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $7, %eax
@@ -213,6 +182,12 @@ define i64 @test_mul_by_7(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_7:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: leaq (,%rdi,8), %rax
+; X64-OPT-NEXT: subq %rdi, %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_7:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $7, %rdi, %rax
@@ -230,11 +205,6 @@ define i64 @test_mul_by_8(i64 %x) {
; X86-NEXT: shll $3, %eax
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_8:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: leaq (,%rdi,8), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_8:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -243,10 +213,10 @@ define i64 @test_mul_by_8(i64 %x) {
; X86-NOOPT-NEXT: shll $3, %eax
; X86-NOOPT-NEXT: retl
;
-; X64-NOOPT-LABEL: test_mul_by_8:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: leaq (,%rdi,8), %rax
-; X64-NOOPT-NEXT: retq
+; X64-LABEL: test_mul_by_8:
+; X64: # %bb.0:
+; X64-NEXT: leaq (,%rdi,8), %rax
+; X64-NEXT: retq
%mul = mul nsw i64 %x, 8
ret i64 %mul
}
@@ -261,11 +231,6 @@ define i64 @test_mul_by_9(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_9:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: leaq (%rdi,%rdi,8), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_9:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $9, %eax
@@ -274,10 +239,10 @@ define i64 @test_mul_by_9(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
-; X64-NOOPT-LABEL: test_mul_by_9:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: leaq (%rdi,%rdi,8), %rax
-; X64-NOOPT-NEXT: retq
+; X64-LABEL: test_mul_by_9:
+; X64: # %bb.0:
+; X64-NEXT: leaq (%rdi,%rdi,8), %rax
+; X64-NEXT: retq
%mul = mul nsw i64 %x, 9
ret i64 %mul
}
@@ -292,12 +257,6 @@ define i64 @test_mul_by_10(i64 %x) {
; X86-NEXT: leal (%edx,%ecx,2), %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_10:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: addq %rdi, %rdi
-; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_10:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $10, %eax
@@ -306,6 +265,12 @@ define i64 @test_mul_by_10(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_10:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: addq %rdi, %rdi
+; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_10:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $10, %rdi, %rax
@@ -325,6 +290,14 @@ define i64 @test_mul_by_11(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_11:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $11, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $11, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_11:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,4), %rax
@@ -337,23 +310,15 @@ define i64 @test_mul_by_11(i64 %x) {
; X64-JAG-NEXT: leaq (%rdi,%rax,2), %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_11:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $11, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $11, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_11:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $11, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_11:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $11, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_11:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $11, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 11
ret i64 %mul
}
@@ -368,12 +333,6 @@ define i64 @test_mul_by_12(i64 %x) {
; X86-NEXT: leal (%edx,%ecx,4), %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_12:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: shlq $2, %rdi
-; X64-OPT-NEXT: leaq (%rdi,%rdi,2), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_12:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $12, %eax
@@ -382,6 +341,12 @@ define i64 @test_mul_by_12(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_12:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: shlq $2, %rdi
+; X64-OPT-NEXT: leaq (%rdi,%rdi,2), %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_12:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $12, %rdi, %rax
@@ -401,6 +366,14 @@ define i64 @test_mul_by_13(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_13:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $13, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $13, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_13:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,2), %rax
@@ -413,23 +386,15 @@ define i64 @test_mul_by_13(i64 %x) {
; X64-JAG-NEXT: leaq (%rdi,%rax,4), %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_13:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $13, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $13, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_13:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $13, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_13:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $13, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_13:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $13, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 13
ret i64 %mul
}
@@ -447,14 +412,6 @@ define i64 @test_mul_by_14(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_14:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: movq %rdi, %rax
-; X64-OPT-NEXT: shlq $4, %rax
-; X64-OPT-NEXT: subq %rdi, %rax
-; X64-OPT-NEXT: subq %rdi, %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_14:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $14, %eax
@@ -463,6 +420,14 @@ define i64 @test_mul_by_14(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_14:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: movq %rdi, %rax
+; X64-OPT-NEXT: shlq $4, %rax
+; X64-OPT-NEXT: subq %rdi, %rax
+; X64-OPT-NEXT: subq %rdi, %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_14:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $14, %rdi, %rax
@@ -482,12 +447,6 @@ define i64 @test_mul_by_15(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_15:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
-; X64-OPT-NEXT: leaq (%rax,%rax,2), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_15:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $15, %eax
@@ -496,6 +455,12 @@ define i64 @test_mul_by_15(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_15:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
+; X64-OPT-NEXT: leaq (%rax,%rax,2), %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_15:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $15, %rdi, %rax
@@ -513,12 +478,6 @@ define i64 @test_mul_by_16(i64 %x) {
; X86-NEXT: shll $4, %eax
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_16:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: movq %rdi, %rax
-; X64-OPT-NEXT: shlq $4, %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_16:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -527,11 +486,11 @@ define i64 @test_mul_by_16(i64 %x) {
; X86-NOOPT-NEXT: shll $4, %eax
; X86-NOOPT-NEXT: retl
;
-; X64-NOOPT-LABEL: test_mul_by_16:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: movq %rdi, %rax
-; X64-NOOPT-NEXT: shlq $4, %rax
-; X64-NOOPT-NEXT: retq
+; X64-LABEL: test_mul_by_16:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: shlq $4, %rax
+; X64-NEXT: retq
%mul = mul nsw i64 %x, 16
ret i64 %mul
}
@@ -548,6 +507,14 @@ define i64 @test_mul_by_17(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_17:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $17, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $17, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_17:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: movq %rdi, %rax
@@ -562,25 +529,17 @@ define i64 @test_mul_by_17(i64 %x) {
; X64-JAG-NEXT: leaq (%rax,%rdi), %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_17:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $17, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $17, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
-;
-; X64-NOOPT-LABEL: test_mul_by_17:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: imulq $17, %rdi, %rax
-; X64-NOOPT-NEXT: retq
-;
; X64-SLM-LABEL: test_mul_by_17:
; X64-SLM: # %bb.0:
; X64-SLM-NEXT: movq %rdi, %rax
; X64-SLM-NEXT: shlq $4, %rax
; X64-SLM-NEXT: addq %rdi, %rax
; X64-SLM-NEXT: retq
+;
+; X64-NOOPT-LABEL: test_mul_by_17:
+; X64-NOOPT: # %bb.0:
+; X64-NOOPT-NEXT: imulq $17, %rdi, %rax
+; X64-NOOPT-NEXT: retq
%mul = mul nsw i64 %x, 17
ret i64 %mul
}
@@ -595,12 +554,6 @@ define i64 @test_mul_by_18(i64 %x) {
; X86-NEXT: leal (%edx,%ecx,2), %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_18:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: addq %rdi, %rdi
-; X64-OPT-NEXT: leaq (%rdi,%rdi,8), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_18:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $18, %eax
@@ -609,6 +562,12 @@ define i64 @test_mul_by_18(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_18:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: addq %rdi, %rdi
+; X64-OPT-NEXT: leaq (%rdi,%rdi,8), %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_18:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $18, %rdi, %rax
@@ -628,6 +587,14 @@ define i64 @test_mul_by_19(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_19:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $19, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $19, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_19:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,8), %rax
@@ -640,23 +607,15 @@ define i64 @test_mul_by_19(i64 %x) {
; X64-JAG-NEXT: leaq (%rdi,%rax,2), %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_19:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $19, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $19, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_19:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $19, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_19:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $19, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_19:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $19, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 19
ret i64 %mul
}
@@ -671,12 +630,6 @@ define i64 @test_mul_by_20(i64 %x) {
; X86-NEXT: leal (%edx,%ecx,4), %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_20:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: shlq $2, %rdi
-; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_20:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $20, %eax
@@ -685,6 +638,12 @@ define i64 @test_mul_by_20(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_20:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: shlq $2, %rdi
+; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_20:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $20, %rdi, %rax
@@ -704,6 +663,14 @@ define i64 @test_mul_by_21(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_21:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $21, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $21, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_21:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,4), %rax
@@ -716,23 +683,15 @@ define i64 @test_mul_by_21(i64 %x) {
; X64-JAG-NEXT: leaq (%rdi,%rax,4), %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_21:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $21, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $21, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_21:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $21, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_21:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $21, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_21:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $21, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 21
ret i64 %mul
}
@@ -749,6 +708,14 @@ define i64 @test_mul_by_22(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_22:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $22, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $22, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_22:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,4), %rax
@@ -763,23 +730,15 @@ define i64 @test_mul_by_22(i64 %x) {
; X64-JAG-NEXT: addq %rdi, %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_22:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $22, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $22, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_22:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $22, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_22:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $22, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_22:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $22, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 22
ret i64 %mul
}
@@ -796,6 +755,14 @@ define i64 @test_mul_by_23(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_23:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $23, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $23, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_23:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,2), %rax
@@ -810,23 +777,15 @@ define i64 @test_mul_by_23(i64 %x) {
; X64-JAG-NEXT: subq %rdi, %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_23:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $23, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $23, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_23:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $23, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_23:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $23, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_23:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $23, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 23
ret i64 %mul
}
@@ -841,12 +800,6 @@ define i64 @test_mul_by_24(i64 %x) {
; X86-NEXT: leal (%edx,%ecx,8), %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_24:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: shlq $3, %rdi
-; X64-OPT-NEXT: leaq (%rdi,%rdi,2), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_24:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $24, %eax
@@ -855,6 +808,12 @@ define i64 @test_mul_by_24(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_24:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: shlq $3, %rdi
+; X64-OPT-NEXT: leaq (%rdi,%rdi,2), %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_24:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $24, %rdi, %rax
@@ -874,12 +833,6 @@ define i64 @test_mul_by_25(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_25:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
-; X64-OPT-NEXT: leaq (%rax,%rax,4), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_25:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $25, %eax
@@ -888,6 +841,12 @@ define i64 @test_mul_by_25(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_25:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
+; X64-OPT-NEXT: leaq (%rax,%rax,4), %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_25:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $25, %rdi, %rax
@@ -908,6 +867,14 @@ define i64 @test_mul_by_26(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_26:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $26, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $26, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_26:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,4), %rax
@@ -922,23 +889,15 @@ define i64 @test_mul_by_26(i64 %x) {
; X64-JAG-NEXT: addq %rdi, %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_26:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $26, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $26, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_26:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $26, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_26:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $26, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_26:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $26, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 26
ret i64 %mul
}
@@ -954,12 +913,6 @@ define i64 @test_mul_by_27(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_27:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: leaq (%rdi,%rdi,8), %rax
-; X64-OPT-NEXT: leaq (%rax,%rax,2), %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_27:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $27, %eax
@@ -968,6 +921,12 @@ define i64 @test_mul_by_27(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_27:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: leaq (%rdi,%rdi,8), %rax
+; X64-OPT-NEXT: leaq (%rax,%rax,2), %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_27:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $27, %rdi, %rax
@@ -988,6 +947,14 @@ define i64 @test_mul_by_28(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_28:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $28, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $28, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_28:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,8), %rax
@@ -1002,23 +969,15 @@ define i64 @test_mul_by_28(i64 %x) {
; X64-JAG-NEXT: addq %rdi, %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_28:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $28, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $28, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_28:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $28, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_28:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $28, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_28:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $28, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 28
ret i64 %mul
}
@@ -1036,6 +995,14 @@ define i64 @test_mul_by_29(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_29:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $29, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $29, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_29:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,8), %rax
@@ -1052,23 +1019,15 @@ define i64 @test_mul_by_29(i64 %x) {
; X64-JAG-NEXT: addq %rdi, %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_29:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $29, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $29, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_29:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $29, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_29:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $29, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_29:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $29, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 29
ret i64 %mul
}
@@ -1086,14 +1045,6 @@ define i64 @test_mul_by_30(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_30:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: movq %rdi, %rax
-; X64-OPT-NEXT: shlq $5, %rax
-; X64-OPT-NEXT: subq %rdi, %rax
-; X64-OPT-NEXT: subq %rdi, %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_30:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $30, %eax
@@ -1102,6 +1053,14 @@ define i64 @test_mul_by_30(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_30:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: movq %rdi, %rax
+; X64-OPT-NEXT: shlq $5, %rax
+; X64-OPT-NEXT: subq %rdi, %rax
+; X64-OPT-NEXT: subq %rdi, %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_30:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $30, %rdi, %rax
@@ -1122,13 +1081,6 @@ define i64 @test_mul_by_31(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_31:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: movq %rdi, %rax
-; X64-OPT-NEXT: shlq $5, %rax
-; X64-OPT-NEXT: subq %rdi, %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_31:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $31, %eax
@@ -1137,6 +1089,13 @@ define i64 @test_mul_by_31(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_31:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: movq %rdi, %rax
+; X64-OPT-NEXT: shlq $5, %rax
+; X64-OPT-NEXT: subq %rdi, %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_31:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $31, %rdi, %rax
@@ -1154,12 +1113,6 @@ define i64 @test_mul_by_32(i64 %x) {
; X86-NEXT: shll $5, %eax
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_32:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: movq %rdi, %rax
-; X64-OPT-NEXT: shlq $5, %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_32:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1168,11 +1121,11 @@ define i64 @test_mul_by_32(i64 %x) {
; X86-NOOPT-NEXT: shll $5, %eax
; X86-NOOPT-NEXT: retl
;
-; X64-NOOPT-LABEL: test_mul_by_32:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: movq %rdi, %rax
-; X64-NOOPT-NEXT: shlq $5, %rax
-; X64-NOOPT-NEXT: retq
+; X64-LABEL: test_mul_by_32:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: shlq $5, %rax
+; X64-NEXT: retq
%mul = mul nsw i64 %x, 32
ret i64 %mul
}
@@ -1188,6 +1141,14 @@ define i64 @test_mul_by_37(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_37:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $37, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $37, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_37:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,8), %rax
@@ -1200,23 +1161,15 @@ define i64 @test_mul_by_37(i64 %x) {
; X64-JAG-NEXT: leaq (%rdi,%rax,4), %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_37:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $37, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $37, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_37:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $37, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_37:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $37, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_37:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $37, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 37
ret i64 %mul
}
@@ -1232,6 +1185,14 @@ define i64 @test_mul_by_41(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_41:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $41, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $41, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_41:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,4), %rax
@@ -1244,23 +1205,15 @@ define i64 @test_mul_by_41(i64 %x) {
; X64-JAG-NEXT: leaq (%rdi,%rax,8), %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_41:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $41, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $41, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_41:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $41, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_41:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $41, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_41:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $41, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 41
ret i64 %mul
}
@@ -1278,14 +1231,6 @@ define i64 @test_mul_by_62(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_62:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: movq %rdi, %rax
-; X64-OPT-NEXT: shlq $6, %rax
-; X64-OPT-NEXT: subq %rdi, %rax
-; X64-OPT-NEXT: subq %rdi, %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_62:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl $62, %eax
@@ -1294,6 +1239,14 @@ define i64 @test_mul_by_62(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_62:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: movq %rdi, %rax
+; X64-OPT-NEXT: shlq $6, %rax
+; X64-OPT-NEXT: subq %rdi, %rax
+; X64-OPT-NEXT: subq %rdi, %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_62:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $62, %rdi, %rax
@@ -1314,6 +1267,14 @@ define i64 @test_mul_by_66(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_66:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $66, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $66, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_66:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: movq %rdi, %rax
@@ -1328,19 +1289,6 @@ define i64 @test_mul_by_66(i64 %x) {
; X64-JAG-NEXT: leaq (%rax,%rdi,2), %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_66:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $66, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $66, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
-;
-; X64-NOOPT-LABEL: test_mul_by_66:
-; X64-NOOPT: # %bb.0:
-; X64-NOOPT-NEXT: imulq $66, %rdi, %rax
-; X64-NOOPT-NEXT: retq
-;
; X64-SLM-LABEL: test_mul_by_66:
; X64-SLM: # %bb.0:
; X64-SLM-NEXT: movq %rdi, %rax
@@ -1348,6 +1296,11 @@ define i64 @test_mul_by_66(i64 %x) {
; X64-SLM-NEXT: addq %rdi, %rax
; X64-SLM-NEXT: addq %rdi, %rax
; X64-SLM-NEXT: retq
+;
+; X64-NOOPT-LABEL: test_mul_by_66:
+; X64-NOOPT: # %bb.0:
+; X64-NOOPT-NEXT: imulq $66, %rdi, %rax
+; X64-NOOPT-NEXT: retq
%mul = mul nsw i64 %x, 66
ret i64 %mul
}
@@ -1363,6 +1316,14 @@ define i64 @test_mul_by_73(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_73:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $73, %eax
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $73, {{[0-9]+}}(%esp), %ecx
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_73:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: leaq (%rdi,%rdi,8), %rax
@@ -1375,23 +1336,15 @@ define i64 @test_mul_by_73(i64 %x) {
; X64-JAG-NEXT: leaq (%rdi,%rax,8), %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_73:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $73, %eax
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $73, {{[0-9]+}}(%esp), %ecx
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_73:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $73, %rdi, %rax
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_73:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $73, %rdi, %rax
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_73:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $73, %rdi, %rax
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 73
ret i64 %mul
}
@@ -1408,6 +1361,14 @@ define i64 @test_mul_by_520(i64 %x) {
; X86-NEXT: addl %ecx, %edx
; X86-NEXT: retl
;
+; X86-NOOPT-LABEL: test_mul_by_520:
+; X86-NOOPT: # %bb.0:
+; X86-NOOPT-NEXT: movl $520, %eax # imm = 0x208
+; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
+; X86-NOOPT-NEXT: imull $520, {{[0-9]+}}(%esp), %ecx # imm = 0x208
+; X86-NOOPT-NEXT: addl %ecx, %edx
+; X86-NOOPT-NEXT: retl
+;
; X64-HSW-LABEL: test_mul_by_520:
; X64-HSW: # %bb.0:
; X64-HSW-NEXT: movq %rdi, %rax
@@ -1422,23 +1383,15 @@ define i64 @test_mul_by_520(i64 %x) {
; X64-JAG-NEXT: leaq (%rax,%rdi,8), %rax
; X64-JAG-NEXT: retq
;
-; X86-NOOPT-LABEL: test_mul_by_520:
-; X86-NOOPT: # %bb.0:
-; X86-NOOPT-NEXT: movl $520, %eax # imm = 0x208
-; X86-NOOPT-NEXT: mull {{[0-9]+}}(%esp)
-; X86-NOOPT-NEXT: imull $520, {{[0-9]+}}(%esp), %ecx # imm = 0x208
-; X86-NOOPT-NEXT: addl %ecx, %edx
-; X86-NOOPT-NEXT: retl
+; X64-SLM-LABEL: test_mul_by_520:
+; X64-SLM: # %bb.0:
+; X64-SLM-NEXT: imulq $520, %rdi, %rax # imm = 0x208
+; X64-SLM-NEXT: retq
;
; X64-NOOPT-LABEL: test_mul_by_520:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $520, %rdi, %rax # imm = 0x208
; X64-NOOPT-NEXT: retq
-;
-; X64-SLM-LABEL: test_mul_by_520:
-; X64-SLM: # %bb.0:
-; X64-SLM-NEXT: imulq $520, %rdi, %rax # imm = 0x208
-; X64-SLM-NEXT: retq
%mul = mul nsw i64 %x, 520
ret i64 %mul
}
@@ -1462,13 +1415,6 @@ define i64 @test_mul_by_neg10(i64 %x) {
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_neg10:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: addq %rdi, %rdi
-; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
-; X64-OPT-NEXT: negq %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_neg10:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl {{[0-9]+}}(%esp), %ecx
@@ -1480,6 +1426,13 @@ define i64 @test_mul_by_neg10(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_neg10:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: addq %rdi, %rdi
+; X64-OPT-NEXT: leaq (%rdi,%rdi,4), %rax
+; X64-OPT-NEXT: negq %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_neg10:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $-10, %rdi, %rax
@@ -1507,13 +1460,6 @@ define i64 @test_mul_by_neg36(i64 %x) {
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl
;
-; X64-OPT-LABEL: test_mul_by_neg36:
-; X64-OPT: # %bb.0:
-; X64-OPT-NEXT: shlq $2, %rdi
-; X64-OPT-NEXT: leaq (%rdi,%rdi,8), %rax
-; X64-OPT-NEXT: negq %rax
-; X64-OPT-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_by_neg36:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: movl {{[0-9]+}}(%esp), %ecx
@@ -1525,6 +1471,13 @@ define i64 @test_mul_by_neg36(i64 %x) {
; X86-NOOPT-NEXT: addl %ecx, %edx
; X86-NOOPT-NEXT: retl
;
+; X64-OPT-LABEL: test_mul_by_neg36:
+; X64-OPT: # %bb.0:
+; X64-OPT-NEXT: shlq $2, %rdi
+; X64-OPT-NEXT: leaq (%rdi,%rdi,8), %rax
+; X64-OPT-NEXT: negq %rax
+; X64-OPT-NEXT: retq
+;
; X64-NOOPT-LABEL: test_mul_by_neg36:
; X64-NOOPT: # %bb.0:
; X64-NOOPT-NEXT: imulq $-36, %rdi, %rax
@@ -1567,22 +1520,6 @@ define i64 @test_mul_spec(i64 %x) nounwi
; X86-NEXT: popl %ebx
; X86-NEXT: retl
;
-; X64-HSW-LABEL: test_mul_spec:
-; X64-HSW: # %bb.0:
-; X64-HSW-NEXT: leaq (%rdi,%rdi,8), %rcx
-; X64-HSW-NEXT: addq $42, %rcx
-; X64-HSW-NEXT: leaq (%rdi,%rdi,4), %rax
-; X64-HSW-NEXT: addq $2, %rax
-; X64-HSW-NEXT: imulq %rcx, %rax
-; X64-HSW-NEXT: retq
-;
-; X64-JAG-LABEL: test_mul_spec:
-; X64-JAG: # %bb.0:
-; X64-JAG-NEXT: leaq 42(%rdi,%rdi,8), %rcx
-; X64-JAG-NEXT: leaq 2(%rdi,%rdi,4), %rax
-; X64-JAG-NEXT: imulq %rcx, %rax
-; X64-JAG-NEXT: retq
-;
; X86-NOOPT-LABEL: test_mul_spec:
; X86-NOOPT: # %bb.0:
; X86-NOOPT-NEXT: pushl %ebx
@@ -1615,21 +1552,21 @@ define i64 @test_mul_spec(i64 %x) nounwi
; X86-NOOPT-NEXT: popl %ebx
; X86-NOOPT-NEXT: retl
;
-; HSW-NOOPT-LABEL: test_mul_spec:
-; HSW-NOOPT: # %bb.0:
-; HSW-NOOPT-NEXT: leaq (%rdi,%rdi,8), %rcx
-; HSW-NOOPT-NEXT: addq $42, %rcx
-; HSW-NOOPT-NEXT: leaq (%rdi,%rdi,4), %rax
-; HSW-NOOPT-NEXT: addq $2, %rax
-; HSW-NOOPT-NEXT: imulq %rcx, %rax
-; HSW-NOOPT-NEXT: retq
-;
-; JAG-NOOPT-LABEL: test_mul_spec:
-; JAG-NOOPT: # %bb.0:
-; JAG-NOOPT-NEXT: leaq 42(%rdi,%rdi,8), %rcx
-; JAG-NOOPT-NEXT: leaq 2(%rdi,%rdi,4), %rax
-; JAG-NOOPT-NEXT: imulq %rcx, %rax
-; JAG-NOOPT-NEXT: retq
+; X64-HSW-LABEL: test_mul_spec:
+; X64-HSW: # %bb.0:
+; X64-HSW-NEXT: leaq (%rdi,%rdi,8), %rcx
+; X64-HSW-NEXT: addq $42, %rcx
+; X64-HSW-NEXT: leaq (%rdi,%rdi,4), %rax
+; X64-HSW-NEXT: addq $2, %rax
+; X64-HSW-NEXT: imulq %rcx, %rax
+; X64-HSW-NEXT: retq
+;
+; X64-JAG-LABEL: test_mul_spec:
+; X64-JAG: # %bb.0:
+; X64-JAG-NEXT: leaq 42(%rdi,%rdi,8), %rcx
+; X64-JAG-NEXT: leaq 2(%rdi,%rdi,4), %rax
+; X64-JAG-NEXT: imulq %rcx, %rax
+; X64-JAG-NEXT: retq
;
; X64-SLM-LABEL: test_mul_spec:
; X64-SLM: # %bb.0:
@@ -1638,12 +1575,28 @@ define i64 @test_mul_spec(i64 %x) nounwi
; X64-SLM-NEXT: imulq %rcx, %rax
; X64-SLM-NEXT: retq
;
-; SLM-NOOPT-LABEL: test_mul_spec:
-; SLM-NOOPT: # %bb.0:
-; SLM-NOOPT-NEXT: leaq 42(%rdi,%rdi,8), %rcx
-; SLM-NOOPT-NEXT: leaq 2(%rdi,%rdi,4), %rax
-; SLM-NOOPT-NEXT: imulq %rcx, %rax
-; SLM-NOOPT-NEXT: retq
+; X64-HSW-NOOPT-LABEL: test_mul_spec:
+; X64-HSW-NOOPT: # %bb.0:
+; X64-HSW-NOOPT-NEXT: leaq (%rdi,%rdi,8), %rcx
+; X64-HSW-NOOPT-NEXT: addq $42, %rcx
+; X64-HSW-NOOPT-NEXT: leaq (%rdi,%rdi,4), %rax
+; X64-HSW-NOOPT-NEXT: addq $2, %rax
+; X64-HSW-NOOPT-NEXT: imulq %rcx, %rax
+; X64-HSW-NOOPT-NEXT: retq
+;
+; X64-JAG-NOOPT-LABEL: test_mul_spec:
+; X64-JAG-NOOPT: # %bb.0:
+; X64-JAG-NOOPT-NEXT: leaq 42(%rdi,%rdi,8), %rcx
+; X64-JAG-NOOPT-NEXT: leaq 2(%rdi,%rdi,4), %rax
+; X64-JAG-NOOPT-NEXT: imulq %rcx, %rax
+; X64-JAG-NOOPT-NEXT: retq
+;
+; X64-SLM-NOOPT-LABEL: test_mul_spec:
+; X64-SLM-NOOPT: # %bb.0:
+; X64-SLM-NOOPT-NEXT: leaq 42(%rdi,%rdi,8), %rcx
+; X64-SLM-NOOPT-NEXT: leaq 2(%rdi,%rdi,4), %rax
+; X64-SLM-NOOPT-NEXT: imulq %rcx, %rax
+; X64-SLM-NOOPT-NEXT: retq
%mul = mul nsw i64 %x, 9
%add = add nsw i64 %mul, 42
%mul2 = mul nsw i64 %x, 5
More information about the llvm-commits
mailing list