[PATCH] D42287: [GlobalISel][X86] Fixing failures after https://reviews.llvm.org/D37775
Alexander Ivchenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 14:43:52 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL324664: [GlobalIsel][X86] Making {G_IMPLICIT_DEF, s128} legal (authored by aivchenk, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D42287?vs=131056&id=133494#toc
Repository:
rL LLVM
https://reviews.llvm.org/D42287
Files:
llvm/trunk/lib/Target/X86/X86LegalizerInfo.cpp
llvm/trunk/test/CodeGen/X86/GlobalISel/select-undef.mir
Index: llvm/trunk/test/CodeGen/X86/GlobalISel/select-undef.mir
===================================================================
--- llvm/trunk/test/CodeGen/X86/GlobalISel/select-undef.mir
+++ llvm/trunk/test/CodeGen/X86/GlobalISel/select-undef.mir
@@ -11,6 +11,9 @@
ret i8 %r
}
+ define float @test3() {
+ ret float undef
+ }
...
---
name: test
@@ -64,3 +67,22 @@
RET 0, implicit $al
...
+---
+name: test3
+alignment: 4
+legalized: true
+regBankSelected: true
+tracksRegLiveness: true
+registers:
+ - { id: 1, class: vecr }
+body: |
+ bb.1 (%ir-block.0):
+ ; ALL-LABEL: name: test3
+ ; ALL: [[DEF:%[0-9]+]]:vr128 = IMPLICIT_DEF
+ ; ALL: $xmm0 = COPY [[DEF]]
+ ; ALL: RET 0, implicit $xmm0
+ %1:vecr(s128) = G_IMPLICIT_DEF
+ $xmm0 = COPY %1:vecr(s128)
+ RET 0, implicit $xmm0
+
+...
Index: llvm/trunk/lib/Target/X86/X86LegalizerInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86LegalizerInfo.cpp
+++ llvm/trunk/lib/Target/X86/X86LegalizerInfo.cpp
@@ -163,6 +163,9 @@
const LLT s128 = LLT::scalar(128);
setAction({G_IMPLICIT_DEF, s64}, Legal);
+ // Need to have that, as tryFoldImplicitDef will create this pattern:
+ // s128 = EXTEND (G_IMPLICIT_DEF s32/s64) -> s128 = G_IMPLICIT_DEF
+ setAction({G_IMPLICIT_DEF, s128}, Legal);
setAction({G_PHI, s64}, Legal);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42287.133494.patch
Type: text/x-patch
Size: 1435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180208/bfad41a8/attachment.bin>
More information about the llvm-commits
mailing list