mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
InstCombine: Shrink ((zext X) & C1) == C2 to fold away the cast if the "zext" and the "and" have one use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132897 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -521,3 +521,13 @@ define i1 @test53(i32 %a, i32 %b) nounwind {
|
||||
%z = icmp eq i32 %x, %y
|
||||
ret i1 %z
|
||||
}
|
||||
|
||||
; CHECK: @test54
|
||||
; CHECK-NEXT: %and = and i8 %a, -64
|
||||
; CHECK-NEXT icmp eq i8 %and, -128
|
||||
define i1 @test54(i8 %a) nounwind {
|
||||
%ext = zext i8 %a to i32
|
||||
%and = and i32 %ext, 192
|
||||
%ret = icmp eq i32 %and, 128
|
||||
ret i1 %ret
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user