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:
9dde514
)
[X86] Add cmov i33 sgt test case
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Tue, 29 Jun 2021 13:36:20 +0000
(14:36 +0100)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Tue, 29 Jun 2021 13:36:33 +0000
(14:36 +0100)
Suggested on D101074 - add a 'icmp sgt i64 %0, -
2147483649
' comparison that can fold to 'icmp sge i64 %0, -
2147483648
' on D101074 allowing i32 immediate folding
llvm/test/CodeGen/X86/cmov.ll
patch
|
blob
|
history
diff --git
a/llvm/test/CodeGen/X86/cmov.ll
b/llvm/test/CodeGen/X86/cmov.ll
index
1f4d6d8
..
9aaf8eb
100644
(file)
--- a/
llvm/test/CodeGen/X86/cmov.ll
+++ b/
llvm/test/CodeGen/X86/cmov.ll
@@
-198,6
+198,19
@@
define i8 @test7(i1 inreg %c, i8 inreg %a, i8 inreg %b) nounwind {
ret i8 %d
}
+define i64 @test8(i64 %0, i64 %1, i64 %2) {
+; CHECK-LABEL: test8:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movq %rsi, %rax
+; CHECK-NEXT: movabsq $-2147483649, %rcx # imm = 0xFFFFFFFF7FFFFFFF
+; CHECK-NEXT: cmpq %rcx, %rdi
+; CHECK-NEXT: cmovleq %rdx, %rax
+; CHECK-NEXT: retq
+ %4 = icmp sgt i64 %0, -2147483649
+ %5 = select i1 %4, i64 %1, i64 %2
+ ret i64 %5
+}
+
define i32 @smin(i32 %x) {
; CHECK-LABEL: smin:
; CHECK: # %bb.0: