[PATCH] D64616: [ARM][LowOverheadLoops] Fix branch target codegen

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 00:09:53 PDT 2019


samparker created this revision.
samparker added reviewers: dmgreen, SjoerdMeijer.
Herald added subscribers: kristof.beyls, javed.absar.

While lowering test.set.loop.iterations, it wasn't checked how the brcond was using the result and so the wls could branch to the loop preheader instead of not entering it. The same was true for loop.decrement.reg.
So brcond and br_cc and now lowered manually when using the hwloop intrinsics. During this we now check whether the result has been negated and whether we're using SETEQ or SETNE and 0 or 1. We can then figure out which basic block the WLS and LE should be targeting.


https://reviews.llvm.org/D64616

Files:
  lib/Target/ARM/ARMISelDAGToDAG.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.h
  lib/Target/ARM/ARMInstrInfo.td
  test/CodeGen/Thumb2/LowOverheadLoops/branch-targets.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64616.209418.patch
Type: text/x-patch
Size: 19957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190712/723b86ce/attachment.bin>


More information about the llvm-commits mailing list