[PATCH] D16156: Proper handling of diamond-like cases in if-conversion
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 12:19:33 PST 2016
kparzysz added a comment.
The 4th statement will return if TT is null (actually both TT and FT), and both branches are analyzable. You are right---returns are not analyzable, but this condition is not triggered. The AnalyzeBranch from Hexagon does not differ in that respect from that from other targets.
I have tried other backends, but I couldn't get just the right optimizations to kick in. Both function calls need to be tail calls, and a jump table needs to be created. Moreover, the block with the jump table branch needs to be a target of a conditional branch that will be recognized as a diamond by the if converter. For other backends, the code never looked right enough to trigger this condition, but I don't think there is anything Hexagon-specific (except the testcase itself).
Repository:
rL LLVM
http://reviews.llvm.org/D16156
More information about the llvm-commits
mailing list