[PATCH] D84586: GlobalISel: Don't assert on operations with no type indices
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 25 07:32:35 PDT 2020
arsenm created this revision.
arsenm added reviewers: aemerson, paquette, aditya_nandakumar.
Herald added subscribers: kerbowa, jfb, hiraditya, tpr, rovka, nhaehnle, wdng, jvesely.
Herald added a project: LLVM.
Fix not marking G_FENCE as legal on AMDGPU This was apparently
defaulting to legal using the "legacy" rules, whatever those are.
https://reviews.llvm.org/D84586
Files:
llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -1523,6 +1523,9 @@
getActionDefinitionsBuilder(G_READCYCLECOUNTER)
.legalFor({S64});
+ getActionDefinitionsBuilder(G_FENCE)
+ .alwaysLegal();
+
getActionDefinitionsBuilder({
// TODO: Verify V_BFI_B32 is generated from expanded bit ops
G_FCOPYSIGN,
Index: llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
===================================================================
--- llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
+++ llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
@@ -105,6 +105,7 @@
static bool hasNoSimpleLoops(const LegalizeRule &Rule, const LegalityQuery &Q,
const std::pair<unsigned, LLT> &Mutation) {
switch (Rule.getAction()) {
+ case Legal:
case Custom:
case Lower:
case MoreElements:
@@ -122,7 +123,7 @@
std::pair<unsigned, LLT> Mutation) {
// If the user wants a custom mutation, then we can't really say much about
// it. Return true, and trust that they're doing the right thing.
- if (Rule.getAction() == Custom)
+ if (Rule.getAction() == Custom || Rule.getAction() == Legal)
return true;
const unsigned TypeIdx = Mutation.first;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84586.280678.patch
Type: text/x-patch
Size: 1396 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200725/fe919e33/attachment.bin>
More information about the llvm-commits
mailing list