With t2DoLoopDec we can be left with some extra MOV's in the preheaders of tail predicated loops. This removes them, in the same way we remove other dead variables.
Details
Diff Detail
Event Timeline
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | ||
---|---|---|
793 | Is it guaranteed that these extra instructions are unused (and so it's ok to remove them without any extra RDA checks)? |
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | ||
---|---|---|
793 | I am hoping that is what TryRemove will do. It checks for things like corrupting IT blocks too. I'm not super confident about this code late-backend dead code removal not causing some problems, but hope it's at least as sane as the existing checks. I have not seen any problems so far at least. |
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | ||
---|---|---|
802 | TryRemove is, relatively, robust :) I think you should just be able to pass ToRemove in place of ElementChain here, though I can't immediately remember why that isn't the case for the loop above. |
Is it guaranteed that these extra instructions are unused (and so it's ok to remove them without any extra RDA checks)?