[PATCH] D63285: [RISCV] Fix a potential issue in shouldInsertFixupForCodeAlign()
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 21:39:07 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL366175: [RISCV] Fix a potential issue in shouldInsertFixupForCodeAlign() (authored by asb, committed by ).
Herald added subscribers: lenary, MaskRay.
Changed prior to commit:
https://reviews.llvm.org/D63285?vs=205554&id=210022#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63285/new/
https://reviews.llvm.org/D63285
Files:
llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
Index: llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
===================================================================
--- llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
+++ llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
@@ -329,11 +329,10 @@
if (!STI.getFeatureBits()[RISCV::FeatureRelax])
return false;
- // Calculate total Nops we need to insert.
+ // Calculate total Nops we need to insert. If there are none to insert
+ // then simply return.
unsigned Count;
- shouldInsertExtraNopBytesForCodeAlign(AF, Count);
- // No Nop need to insert, simply return.
- if (Count == 0)
+ if (!shouldInsertExtraNopBytesForCodeAlign(AF, Count) || (Count == 0))
return false;
MCContext &Ctx = Asm.getContext();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63285.210022.patch
Type: text/x-patch
Size: 774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190716/c757301a/attachment.bin>
More information about the llvm-commits
mailing list