The uniformity analysis treated an undef argument to phi to be distinct from any
other argument, equivalent to calling PHINode::hasConstantValue() instead of
PHINode::hasConstantOrUndefValue(). Such a phi was reported as divergent. This
is different from the older divergence analysis which treats such a phi as
uniform. Fixed uniformity analysis to match the older behaviour.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I like this but I will leave it to the other reviewers to approve, since I know they have expressed doubts in the past.
llvm/include/llvm/ADT/GenericSSAContext.h | ||
---|---|---|
62 ↗ | (On Diff #498311) | Commit this file separately? |
Comment Actions
Although I wanted the optimization for the undef case to be bring back in a more defined way, I think it is acceptable to match with existing divergence analysis. This would help with the transition to uniform analysis, so LGTM. Please also address Jay's suggestion. Could you also add some FIXME around the code like: optimally reporting uniform with undef input should be done in more defined way. In general CFG, it might be broken?