diff options
author | Petar Avramovic <Petar.Avramovic@rt-rk.com> | 2019-09-05 11:20:32 +0000 |
---|---|---|
committer | Petar Avramovic <Petar.Avramovic@rt-rk.com> | 2019-09-05 11:20:32 +0000 |
commit | a4bfc8dfdaef430550b13041238a65e8613f2561 (patch) | |
tree | a41500c69c126ce7c47169f78208fad3a04ff168 /llvm/lib | |
parent | f5c7fe0795c8f2de8ee2c9fe6e8fbd89e1cf8bff (diff) | |
download | bcm5719-llvm-a4bfc8dfdaef430550b13041238a65e8613f2561.tar.gz bcm5719-llvm-a4bfc8dfdaef430550b13041238a65e8613f2561.zip |
[MIPS GlobalISel] Select G_FENCE
G_FENCE comes form fence instruction. For MIPS fence is generated in
AtomicExpandPass when atomic instruction gets surrounded with fence
instruction when needed.
G_FENCE arguments don't have LLT, because of that there is no job for
legalizer and regbankselect. Instruction select G_FENCE for MIPS32.
Differential Revision: https://reviews.llvm.org/D67181
llvm-svn: 371056
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/Mips/MipsInstructionSelector.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsInstructionSelector.cpp b/llvm/lib/Target/Mips/MipsInstructionSelector.cpp index da319265fba..f0c3d3d46bd 100644 --- a/llvm/lib/Target/Mips/MipsInstructionSelector.cpp +++ b/llvm/lib/Target/Mips/MipsInstructionSelector.cpp @@ -752,6 +752,10 @@ bool MipsInstructionSelector::select(MachineInstr &I) { I.eraseFromParent(); return true; } + case G_FENCE: { + MI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(Mips::SYNC)).addImm(0); + break; + } default: return false; } |