-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[X86] fix combineSubSetcc to handle a large constant (#66941)
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3 | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=x86-64-v2 | FileCheck %s | ||
|
||
define i128 @select_eq_i128(ptr %a) { | ||
; CHECK-LABEL: select_eq_i128: | ||
; CHECK: # %bb.0: | ||
; CHECK-NEXT: movdqa (%rdi), %xmm0 | ||
; CHECK-NEXT: pxor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 | ||
; CHECK-NEXT: xorl %eax, %eax | ||
; CHECK-NEXT: ptest %xmm0, %xmm0 | ||
; CHECK-NEXT: setne %al | ||
; CHECK-NEXT: xorl %ecx, %ecx | ||
; CHECK-NEXT: addq $-1, %rax | ||
; CHECK-NEXT: movabsq $9223372036854775807, %rdx # imm = 0x7FFFFFFFFFFFFFFF | ||
; CHECK-NEXT: adcq %rcx, %rdx | ||
; CHECK-NEXT: retq | ||
%1 = load i128, ptr %a, align 16 | ||
%cmp = icmp eq i128 %1, 1 | ||
%cond = select i1 %cmp, i128 170141183460469231731687303715884105727, i128 -170141183460469231731687303715884105728 | ||
ret i128 %cond | ||
} |