Skip to content

Commit 270fc0e

Browse files
committed
[DAGCombiner][X86] Add pre-commit tests. NFC.
1 parent 876174f commit 270fc0e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,20 @@ for.body:
151151
exit:
152152
ret i32 0
153153
}
154+
155+
define i64 @pr128309(i64 %x) {
156+
; X64-LABEL: pr128309:
157+
; X64: # %bb.0: # %entry
158+
; X64-NEXT: movl %edi, %eax
159+
; X64-NEXT: andl $18114, %eax # imm = 0x46C2
160+
; X64-NEXT: addl $-65530, %eax # imm = 0xFFFF0006
161+
; X64-NEXT: andl %edi, %eax
162+
; X64-NEXT: retq
163+
entry:
164+
%shl = shl i64 %x, 48
165+
%and = and i64 %shl, 5098637728136822784
166+
%add = add i64 %and, 1688849860263936
167+
%lshr = lshr i64 %add, 48
168+
%res = and i64 %lshr, %x
169+
ret i64 %res
170+
}

0 commit comments

Comments
 (0)