mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 15:39:06 +00:00
[ValueTracking] regenerate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d7c9322f96
commit
edac66f29b
@ -1,14 +1,22 @@
|
|||||||
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||||
; RUN: opt < %s -instcombine -S | FileCheck %s
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
|
|
||||||
define i32 @assume_add(i32 %a, i32 %b) {
|
define i32 @assume_add(i32 %a, i32 %b) {
|
||||||
; CHECK-LABEL: @assume_add(
|
; CHECK-LABEL: @assume_add(
|
||||||
%1 = add i32 %a, %b
|
; CHECK-NEXT: [[T1:%.*]] = add i32 [[A:%.*]], [[B:%.*]]
|
||||||
%last_two_digits = and i32 %1, 3
|
; CHECK-NEXT: [[LAST_TWO_DIGITS:%.*]] = and i32 [[T1]], 3
|
||||||
%2 = icmp eq i32 %last_two_digits, 0
|
; CHECK-NEXT: [[T2:%.*]] = icmp eq i32 [[LAST_TWO_DIGITS]], 0
|
||||||
call void @llvm.assume(i1 %2)
|
; CHECK-NEXT: call void @llvm.assume(i1 [[T2]])
|
||||||
%3 = add i32 %1, 3
|
; CHECK-NEXT: [[T3:%.*]] = or i32 [[T1]], 3
|
||||||
; CHECK: %3 = or i32 %1, 3
|
; CHECK-NEXT: ret i32 [[T3]]
|
||||||
ret i32 %3
|
;
|
||||||
|
%t1 = add i32 %a, %b
|
||||||
|
%last_two_digits = and i32 %t1, 3
|
||||||
|
%t2 = icmp eq i32 %last_two_digits, 0
|
||||||
|
call void @llvm.assume(i1 %t2)
|
||||||
|
%t3 = add i32 %t1, 3
|
||||||
|
ret i32 %t3
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @llvm.assume(i1)
|
declare void @llvm.assume(i1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user