Skip to content

Commit 8d3556e

Browse files
committed
[X86] Address reviews
1 parent 55d53f5 commit 8d3556e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53616,7 +53616,7 @@ static SDValue combinei64TruncSrlAdd(SDValue N, EVT VT, SelectionDAG &DAG,
5361653616
m_ConstInt(SrlConst)))))
5361753617
return SDValue();
5361853618

53619-
if (!SrlConst.ugt(31) || AddConst.lshr(SrlConst).shl(SrlConst) != AddConst)
53619+
if (SrlConst.ule(31) || AddConst.lshr(SrlConst).shl(SrlConst) != AddConst)
5362053620
return SDValue();
5362153621

5362253622
SDValue AddLHSSrl =

llvm/test/CodeGen/X86/combine-i64-trunc-srl-add.ll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ define i1 @test_ugt_add(i64 %x) {
6262

6363
define i1 @test_eq_trunc_add(i64 %x) {
6464
; X64-LABEL: test_eq_trunc_add:
65-
; X64: # %bb.0: # %entry
65+
; X64: # %bb.0:
6666
; X64-NEXT: shrq $48, %rdi
6767
; X64-NEXT: cmpl $65525, %edi # imm = 0xFFF5
6868
; X64-NEXT: sete %al
6969
; X64-NEXT: retq
70-
entry:
7170
%add = add i64 %x, 3940649673949184
7271
%shr = lshr i64 %add, 48
7372
%conv = trunc i64 %shr to i32
@@ -89,12 +88,11 @@ define i1 @test_eq_add(i64 %x) {
8988

9089
define i1 @test_ne_trunc_add(i64 %x) {
9190
; X64-LABEL: test_ne_trunc_add:
92-
; X64: # %bb.0: # %entry
91+
; X64: # %bb.0:
9392
; X64-NEXT: shrq $48, %rdi
9493
; X64-NEXT: cmpl $65525, %edi # imm = 0xFFF5
9594
; X64-NEXT: setne %al
9695
; X64-NEXT: retq
97-
entry:
9896
%add = add i64 %x, 3940649673949184
9997
%shr = lshr i64 %add, 48
10098
%conv = trunc i64 %shr to i32

0 commit comments

Comments
 (0)