mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Add missing zextloadi1 to i64 patterns. PR16721.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183587 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1c2b03aae9
commit
7de1d327f1
@ -239,6 +239,9 @@ def LDXri : F3_2<3, 0b001011,
|
||||
[(set i64:$dst, (load ADDRri:$addr))]>;
|
||||
|
||||
// Extending loads to i64.
|
||||
def : Pat<(i64 (zextloadi1 ADDRrr:$addr)), (LDUBrr ADDRrr:$addr)>;
|
||||
def : Pat<(i64 (zextloadi1 ADDRri:$addr)), (LDUBri ADDRri:$addr)>;
|
||||
|
||||
def : Pat<(i64 (zextloadi8 ADDRrr:$addr)), (LDUBrr ADDRrr:$addr)>;
|
||||
def : Pat<(i64 (zextloadi8 ADDRri:$addr)), (LDUBri ADDRri:$addr)>;
|
||||
def : Pat<(i64 (extloadi8 ADDRrr:$addr)), (LDUBrr ADDRrr:$addr)>;
|
||||
|
@ -161,6 +161,14 @@ define i64 @loads(i64* %p, i32* %q, i32* %r, i16* %s) {
|
||||
ret i64 %x3
|
||||
}
|
||||
|
||||
; CHECK: load_bool
|
||||
; CHECK: ldub [%i0], %i0
|
||||
define i64 @load_bool(i1* %p) {
|
||||
%a = load i1* %p
|
||||
%b = zext i1 %a to i64
|
||||
ret i64 %b
|
||||
}
|
||||
|
||||
; CHECK: stores
|
||||
; CHECK: ldx [%i0+8], [[R:%[goli][0-7]]]
|
||||
; CHECK: stx [[R]], [%i0+16]
|
||||
|
Loading…
Reference in New Issue
Block a user