[PATCH] D26204: [llvm] FIx if-clause -Wmisleading-indentation issue.
Kirill Bobyrev via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 1 10:41:23 PDT 2016
omtcyfz created this revision.
omtcyfz added reviewers: alexfh, bkramer.
omtcyfz added a subscriber: llvm-commits.
While bootstrapping Clang with recent `gcc 6.2.0` I found a bug related to misleading indentation.
I believe, a pair of `{}` was forgotten, especially given the above similar piece of code:
c++
if (!RDef || !HII->isPredicable(*RDef)) {
Done = coalesceRegisters(RD, RegisterRef(S1));
if (Done) {
UpdRegs.insert(RD.Reg);
UpdRegs.insert(S1.getReg());
}
}
https://reviews.llvm.org/D26204
Files:
lib/Target/Hexagon/HexagonExpandCondsets.cpp
Index: lib/Target/Hexagon/HexagonExpandCondsets.cpp
===================================================================
--- lib/Target/Hexagon/HexagonExpandCondsets.cpp
+++ lib/Target/Hexagon/HexagonExpandCondsets.cpp
@@ -1174,12 +1174,13 @@
if (!Done && S2.isReg()) {
RegisterRef RS = S2;
MachineInstr *RDef = getReachingDefForPred(RS, CI, RP.Reg, false);
- if (!RDef || !HII->isPredicable(*RDef))
+ if (!RDef || !HII->isPredicable(*RDef)) {
Done = coalesceRegisters(RD, RegisterRef(S2));
if (Done) {
UpdRegs.insert(RD.Reg);
UpdRegs.insert(S2.getReg());
}
+ }
}
Changed |= Done;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26204.76594.patch
Type: text/x-patch
Size: 678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161101/9d8b83d1/attachment.bin>
More information about the llvm-commits
mailing list