[llvm] d4a5844 - [X86] Add additional add of mul test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 07:28:31 PDT 2023
Author: Nikita Popov
Date: 2023-04-14T16:28:21+02:00
New Revision: d4a58442b192f537b4b03daa3cc925b35cf4de62
URL: https://github.com/llvm/llvm-project/commit/d4a58442b192f537b4b03daa3cc925b35cf4de62
DIFF: https://github.com/llvm/llvm-project/commit/d4a58442b192f537b4b03daa3cc925b35cf4de62.diff
LOG: [X86] Add additional add of mul test (NFC)
Added:
Modified:
llvm/test/CodeGen/X86/add-of-mul.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/add-of-mul.ll b/llvm/test/CodeGen/X86/add-of-mul.ll
index 843d397ee7c4..ac022048438c 100644
--- a/llvm/test/CodeGen/X86/add-of-mul.ll
+++ b/llvm/test/CodeGen/X86/add-of-mul.ll
@@ -13,6 +13,18 @@ define i32 @test_scalar(i32 %x) {
ret i32 %add
}
+define i32 @test_scalar_commuted(i32 %x) {
+; CHECK-LABEL: test_scalar_commuted:
+; CHECK: # %bb.0:
+; CHECK-NEXT: # kill: def $edi killed $edi def $rdi
+; CHECK-NEXT: leal (%rdi,%rdi,2), %eax
+; CHECK-NEXT: addl %edi, %eax
+; CHECK-NEXT: retq
+ %mul = mul i32 %x, 3
+ %add = add i32 %x, %mul
+ ret i32 %add
+}
+
define <4 x i32> @test_vector(<4 x i32> %x) {
; CHECK-LABEL: test_vector:
; CHECK: # %bb.0:
More information about the llvm-commits
mailing list