mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Transform (sub 0, (zext bool to A)) to (sext bool to A) and
(sub 0, (sext bool to A)) to (zext bool to A). Patch by Muhammad Ahmad Reviewed by Duncan Sands git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
define i32 @a(i1 zeroext %x, i1 zeroext %y) {
|
||||
entry:
|
||||
; CHECK: @a
|
||||
; CHECK: [[TMP1:%.*]] = zext i1 %y to i32
|
||||
; CHECK: [[TMP1:%.*]] = sext i1 %y to i32
|
||||
; CHECK: [[TMP2:%.*]] = select i1 %x, i32 2, i32 1
|
||||
; CHECK-NEXT: sub i32 [[TMP2]], [[TMP1]]
|
||||
; CHECK-NEXT: add i32 [[TMP2]], [[TMP1]]
|
||||
%conv = zext i1 %x to i32
|
||||
%conv3 = zext i1 %y to i32
|
||||
%conv3.neg = sub i32 0, %conv3
|
||||
|
Reference in New Issue
Block a user