projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d4e856
)
[X86] Add additional add of mul test (NFC)
author
Nikita Popov
<npopov@redhat.com>
Fri, 14 Apr 2023 14:28:03 +0000
(16:28 +0200)
committer
Nikita Popov
<npopov@redhat.com>
Fri, 14 Apr 2023 14:28:21 +0000
(16:28 +0200)
llvm/test/CodeGen/X86/add-of-mul.ll
patch
|
blob
|
history
diff --git
a/llvm/test/CodeGen/X86/add-of-mul.ll
b/llvm/test/CodeGen/X86/add-of-mul.ll
index
843d397
..
ac02204
100644
(file)
--- 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: