mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Clean up previous cast optimization a bit. Also make zext elimination a bit more aggressive: if it's not necessary to emit an AND (i.e. high bits are already zero), it's profitable to evaluate the operand at a different type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62297 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -254,3 +254,10 @@ define i1 @test37(i32 %a) {
|
||||
ret i1 %e
|
||||
}
|
||||
|
||||
define i64 @test38(i32 %a) {
|
||||
%1 = icmp eq i32 %a, -2
|
||||
%2 = zext i1 %1 to i8
|
||||
%3 = xor i8 %2, 1
|
||||
%4 = zext i8 %3 to i64
|
||||
ret i64 %4
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user