[PATCH] D58096: [LowerSwitch][AMDGPU] Do not handle impossible values
Roman Tereshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 14 17:24:04 PST 2019
rtereshin added a comment.
In D58096#1398829 <https://reviews.llvm.org/D58096#1398829>, @arsenm wrote:
> It seems weird to me that doing this somewhere else somehow ends up being more expensive, but this needs a comment somewhere explaining why it should be handled here
1. CorrelatedValuePropagation processes many kinds of instructions, LowerSwitch processes switches only.
2. Even if limited to icmp instructions only, CorrelatedValuePropagation when ran after LowerSwitch will have to process roughly `C` icmp's per switch, where `C` is the number of cases in the switch, while LowerSwitch only needs to call LVI once per switch.
CHANGES SINCE LAST ACTION
More information about the llvm-commits