mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
[NFC][InstCombine] i65 tests for 'check for [no] signed truncation' pattern
Those initially broke chromium build: https://bugs.llvm.org/show_bug.cgi?id=38204 and https://crbug.com/864832 llvm-svn: 337364
This commit is contained in:
parent
98853328e2
commit
ba38e8c25f
@ -26,6 +26,20 @@ define i1 @p0(i8 %x) {
|
|||||||
ret i1 %tmp2
|
ret i1 %tmp2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Big unusual bit width, https://bugs.llvm.org/show_bug.cgi?id=38204
|
||||||
|
define i1 @pb(i65 %x) {
|
||||||
|
; CHECK-LABEL: @pb(
|
||||||
|
; CHECK-NEXT: [[TMP0:%.*]] = shl i65 [[X:%.*]], 1
|
||||||
|
; CHECK-NEXT: [[TMP1:%.*]] = ashr exact i65 [[TMP0]], 1
|
||||||
|
; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i65 [[TMP1]], [[X]]
|
||||||
|
; CHECK-NEXT: ret i1 [[TMP2]]
|
||||||
|
;
|
||||||
|
%tmp0 = shl i65 %x, 1
|
||||||
|
%tmp1 = ashr exact i65 %tmp0, 1
|
||||||
|
%tmp2 = icmp eq i65 %x, %tmp1
|
||||||
|
ret i1 %tmp2
|
||||||
|
}
|
||||||
|
|
||||||
; ============================================================================ ;
|
; ============================================================================ ;
|
||||||
; Vector tests
|
; Vector tests
|
||||||
; ============================================================================ ;
|
; ============================================================================ ;
|
||||||
|
@ -26,6 +26,20 @@ define i1 @p0(i8 %x) {
|
|||||||
ret i1 %tmp2
|
ret i1 %tmp2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Big unusual bit width, https://bugs.llvm.org/show_bug.cgi?id=38204
|
||||||
|
define i1 @pb(i65 %x) {
|
||||||
|
; CHECK-LABEL: @pb(
|
||||||
|
; CHECK-NEXT: [[TMP0:%.*]] = shl i65 [[X:%.*]], 1
|
||||||
|
; CHECK-NEXT: [[TMP1:%.*]] = ashr exact i65 [[TMP0]], 1
|
||||||
|
; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i65 [[TMP1]], [[X]]
|
||||||
|
; CHECK-NEXT: ret i1 [[TMP2]]
|
||||||
|
;
|
||||||
|
%tmp0 = shl i65 %x, 1
|
||||||
|
%tmp1 = ashr exact i65 %tmp0, 1
|
||||||
|
%tmp2 = icmp ne i65 %x, %tmp1
|
||||||
|
ret i1 %tmp2
|
||||||
|
}
|
||||||
|
|
||||||
; ============================================================================ ;
|
; ============================================================================ ;
|
||||||
; Vector tests
|
; Vector tests
|
||||||
; ============================================================================ ;
|
; ============================================================================ ;
|
||||||
|
Loading…
Reference in New Issue
Block a user