diff options
author | Kirill Bobyrev <omtcyfz@gmail.com> | 2016-11-02 10:00:40 +0000 |
---|---|---|
committer | Kirill Bobyrev <omtcyfz@gmail.com> | 2016-11-02 10:00:40 +0000 |
commit | 1f1751182eac4d6267f09b4e1e00bd6d4668f0eb (patch) | |
tree | e2635db2e9d3c6a09fce6051bec4521cbdb00562 /llvm/lib | |
parent | 7424c8ccd17b3c8e28d048cd13322d665154bb7a (diff) | |
download | bcm5719-llvm-1f1751182eac4d6267f09b4e1e00bd6d4668f0eb.tar.gz bcm5719-llvm-1f1751182eac4d6267f09b4e1e00bd6d4668f0eb.zip |
[llvm] FIx if-clause -Wmisleading-indentation issue.
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:
```
if (!RDef || !HII->isPredicable(*RDef)) {
Done = coalesceRegisters(RD, RegisterRef(S1));
if (Done) {
UpdRegs.insert(RD.Reg);
UpdRegs.insert(S1.getReg());
}
}
```
Reviewers: kparzysz
Differential Revision: https://reviews.llvm.org/D26204
llvm-svn: 285794
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp b/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp index 2760e16bd0f..15ffa1c4c66 100644 --- a/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp +++ b/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp @@ -1174,12 +1174,13 @@ bool HexagonExpandCondsets::coalesceSegments( 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; } |