diff options
| author | Fangrui Song <maskray@google.com> | 2019-12-29 15:53:46 -0800 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2019-12-29 16:50:42 -0800 |
| commit | 5edb40c0220e80fc4cdb726d30d1d8b8e8580892 (patch) | |
| tree | de4d76facba3a43fd169a68ae019ea66e9975690 /llvm/lib/Target/Mips | |
| parent | b1fb07ddbaa539f9173e32dc27110168b165c1fe (diff) | |
| download | bcm5719-llvm-5edb40c0220e80fc4cdb726d30d1d8b8e8580892.tar.gz bcm5719-llvm-5edb40c0220e80fc4cdb726d30d1d8b8e8580892.zip | |
[SelectionDAG] Disallow indirect "i" constraint
This allows us to delete InlineAsm::Constraint_i workarounds in
SelectionDAGISel::SelectInlineAsmMemoryOperand overrides and
TargetLowering::getInlineAsmMemConstraint overrides.
They were introduced to X86 in r237517 to prevent crashes for
constraints like "=*imr". They were later copied to other targets.
Diffstat (limited to 'llvm/lib/Target/Mips')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp | 1 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp | 4 |
2 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp b/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp index e5997af3bcc..8c36bcd5c8f 100644 --- a/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp +++ b/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp @@ -314,7 +314,6 @@ SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID, switch(ConstraintID) { default: llvm_unreachable("Unexpected asm memory constraint"); - case InlineAsm::Constraint_i: case InlineAsm::Constraint_m: case InlineAsm::Constraint_R: case InlineAsm::Constraint_ZC: diff --git a/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp b/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp index e4b956dd25f..bef1a3657ea 100644 --- a/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp +++ b/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp @@ -1282,10 +1282,6 @@ SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID, default: llvm_unreachable("Unexpected asm memory constraint"); // All memory constraints can at least accept raw pointers. - case InlineAsm::Constraint_i: - OutOps.push_back(Op); - OutOps.push_back(CurDAG->getTargetConstant(0, SDLoc(Op), MVT::i32)); - return false; case InlineAsm::Constraint_m: case InlineAsm::Constraint_o: if (selectAddrRegImm16(Op, Base, Offset)) { |

