diff options
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.cpp')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index bd43909..27c0dfa 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -1230,8 +1230,11 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) { << " case ISD::EntryToken: // These leaves remain the same.\n" << " return N;\n" << " case ISD::AssertSext:\n" - << " case ISD::AssertZext:\n" - << " return Select(N.getOperand(0));\n"; + << " case ISD::AssertZext: {\n" + << " SDOperand Tmp0 = Select(N.getOperand(0));\n" + << " if (!N.Val->hasOneUse()) CodeGenMap[N] = Tmp0;\n" + << " return Tmp0;\n" + << " }\n"; // Group the patterns by their top-level opcodes. std::map<Record*, std::vector<PatternToMatch*>, |