[PATCH] D87771: [AArch64] Emit zext move when the source of the zext is AssertZext or AssertSext
weiwei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 17 22:09:29 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG992698cfbc89: [AArch64] Emit zext move when the source of the zext is AssertZext or AssertSext (authored by wwei).
Changed prior to commit:
https://reviews.llvm.org/D87771?vs=292542&id=292704#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87771/new/
https://reviews.llvm.org/D87771
Files:
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/test/CodeGen/AArch64/shift_minsize.ll
Index: llvm/test/CodeGen/AArch64/shift_minsize.ll
===================================================================
--- llvm/test/CodeGen/AArch64/shift_minsize.ll
+++ llvm/test/CodeGen/AArch64/shift_minsize.ll
@@ -59,7 +59,7 @@
; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
; CHECK-NEXT: .cfi_def_cfa_offset 16
; CHECK-NEXT: .cfi_offset w30, -16
-; CHECK-NEXT: // kill: def $w2 killed $w2 def $x2
+; CHECK-NEXT: mov w2, w2
; CHECK-NEXT: bl __ashlti3
; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
; CHECK-NEXT: ret
@@ -86,7 +86,7 @@
; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
; CHECK-NEXT: .cfi_def_cfa_offset 16
; CHECK-NEXT: .cfi_offset w30, -16
-; CHECK-NEXT: // kill: def $w2 killed $w2 def $x2
+; CHECK-NEXT: mov w2, w2
; CHECK-NEXT: bl __ashrti3
; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
; CHECK-NEXT: ret
@@ -112,7 +112,7 @@
; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
; CHECK-NEXT: .cfi_def_cfa_offset 16
; CHECK-NEXT: .cfi_offset w30, -16
-; CHECK-NEXT: // kill: def $w2 killed $w2 def $x2
+; CHECK-NEXT: mov w2, w2
; CHECK-NEXT: bl __lshrti3
; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
; CHECK-NEXT: ret
Index: llvm/lib/Target/AArch64/AArch64ISelLowering.h
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelLowering.h
+++ llvm/lib/Target/AArch64/AArch64ISelLowering.h
@@ -418,12 +418,14 @@
// Any instruction that defines a 32-bit result zeros out the high half of the
// register. Truncate can be lowered to EXTRACT_SUBREG. CopyFromReg may
// be copying from a truncate. But any other 32-bit operation will zero-extend
-// up to 64 bits.
+// up to 64 bits. AssertSext/AssertZext aren't saying anything about the upper
+// 32 bits, they're probably just qualifying a CopyFromReg.
// FIXME: X86 also checks for CMOV here. Do we need something similar?
static inline bool isDef32(const SDNode &N) {
unsigned Opc = N.getOpcode();
return Opc != ISD::TRUNCATE && Opc != TargetOpcode::EXTRACT_SUBREG &&
- Opc != ISD::CopyFromReg;
+ Opc != ISD::CopyFromReg && Opc != ISD::AssertSext &&
+ Opc != ISD::AssertZext;
}
} // end anonymous namespace
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87771.292704.patch
Type: text/x-patch
Size: 2313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200918/fd3b5238/attachment.bin>
More information about the llvm-commits
mailing list