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
Diff Detail
Event Timeline
lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
12997 | nit: IsLoopIntrinsic is suggesting it is returning a bool, perhaps searchLoopIntrinsic | |
13038 | nit: interested -> interested in? | |
13045 | nit: "... check that how ..." -> "check how"? | |
13076 | Silly question: can you remind me why we are only looking at EQ and NE? | |
lib/Target/ARM/ARMISelLowering.h | ||
129 | nit: all capitals for consistency? |
lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
13076 | Yeah, for loop decrement that could happen... I'll add some more tests. |
- renamed the nodes and the search function.
- added support for other setcc opcodes, other than EQ and NE.
lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
13139 | ah yes, of course, silly me! |
nit: all capitals for consistency?