[llvm] 86bd9c9 - [X86] Precommit a test
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 25 23:33:57 PST 2023
Author: Kazu Hirata
Date: 2023-02-25T23:33:50-08:00
New Revision: 86bd9c984154d625392bfab05541bbe9ee18b6ab
URL: https://github.com/llvm/llvm-project/commit/86bd9c984154d625392bfab05541bbe9ee18b6ab
DIFF: https://github.com/llvm/llvm-project/commit/86bd9c984154d625392bfab05541bbe9ee18b6ab.diff
LOG: [X86] Precommit a test
This patch precommits a test for:
https://github.com/llvm/llvm-project/issues/60374
Added:
Modified:
llvm/test/CodeGen/X86/umax.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/umax.ll b/llvm/test/CodeGen/X86/umax.ll
index ca5ea3a1c7ff0..e4b465449e259 100644
--- a/llvm/test/CodeGen/X86/umax.ll
+++ b/llvm/test/CodeGen/X86/umax.ll
@@ -41,6 +41,27 @@ define i8 @test_i8(i8 %a, i8 %b) nounwind {
ret i8 %r
}
+define i8 @test_i8_1(i8 %a) nounwind {
+; X64-LABEL: test_i8_1:
+; X64: # %bb.0:
+; X64-NEXT: cmpb $2, %dil
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: cmovael %edi, %eax
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+;
+; X86-LABEL: test_i8_1:
+; X86: # %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X86-NEXT: cmpb $2, %cl
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: cmovael %ecx, %eax
+; X86-NEXT: # kill: def $al killed $al killed $eax
+; X86-NEXT: retl
+ %r = call i8 @llvm.umax.i8(i8 %a, i8 1)
+ ret i8 %r
+}
+
define i16 @test_i16(i16 %a, i16 %b) nounwind {
; X64-LABEL: test_i16:
; X64: # %bb.0:
@@ -62,6 +83,27 @@ define i16 @test_i16(i16 %a, i16 %b) nounwind {
ret i16 %r
}
+define i16 @test_i16_1(i16 %a) nounwind {
+; X64-LABEL: test_i16_1:
+; X64: # %bb.0:
+; X64-NEXT: cmpw $2, %di
+; X64-NEXT: movl $1, %eax
+; X64-NEXT: cmovael %edi, %eax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+;
+; X86-LABEL: test_i16_1:
+; X86: # %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X86-NEXT: cmpw $2, %cx
+; X86-NEXT: movl $1, %eax
+; X86-NEXT: cmovael %ecx, %eax
+; X86-NEXT: # kill: def $ax killed $ax killed $eax
+; X86-NEXT: retl
+ %r = call i16 @llvm.umax.i16(i16 %a, i16 1)
+ ret i16 %r
+}
+
define i24 @test_i24(i24 %a, i24 %b) nounwind {
; X64-LABEL: test_i24:
; X64: # %bb.0:
More information about the llvm-commits
mailing list