mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-11 13:46:13 +00:00
Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128286 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6c3891067b
commit
ef7b8d9e5a
@ -2238,4 +2238,23 @@ missed cases:
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
define i1 @test1(i32 %x) nounwind {
|
||||
%and = and i32 %x, 3
|
||||
%cmp = icmp ult i32 %and, 2
|
||||
ret i1 %cmp
|
||||
}
|
||||
|
||||
Can be folded to (x & 2) == 0.
|
||||
|
||||
define i1 @test2(i32 %x) nounwind {
|
||||
%and = and i32 %x, 3
|
||||
%cmp = icmp ugt i32 %and, 1
|
||||
ret i1 %cmp
|
||||
}
|
||||
|
||||
Can be folded to (x & 2) != 0.
|
||||
|
||||
SimplifyDemandedBits shrinks the "and" constant to 2 but instcombine misses the
|
||||
icmp transform.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user