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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
12997 ↗ | (On Diff #209418) | nit: IsLoopIntrinsic is suggesting it is returning a bool, perhaps searchLoopIntrinsic |
13038 ↗ | (On Diff #209418) | nit: interested -> interested in? |
13045 ↗ | (On Diff #209418) | nit: "... check that how ..." -> "check how"? |
13076 ↗ | (On Diff #209418) | Silly question: can you remind me why we are only looking at EQ and NE? |
lib/Target/ARM/ARMISelLowering.h | ||
129 ↗ | (On Diff #209418) | nit: all capitals for consistency? |
lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
13076 ↗ | (On Diff #209418) | Yeah, for loop decrement that could happen... I'll add some more tests. |
Comment Actions
- renamed the nodes and the search function.
- added support for other setcc opcodes, other than EQ and NE.
Comment Actions
looks good to me to, just some nits inline.
lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
13105 ↗ | (On Diff #211093) | perhaps an assert we're expecting a BR_CC here? |
13139 ↗ | (On Diff #211093) | I was wondering if we can return here; not sure though if that is better/more robust. |
13172 ↗ | (On Diff #211093) | but in that case we don't need this unreachable. |
lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
13139 ↗ | (On Diff #211093) | ah yes, of course, silly me! |