You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix invalid IR from scalarrepl-param-hlsl in ReplaceConstantWithInst
ReplaceConstantWithInst(C, V) replaces uses of C in the current function with V.
If such a use C is an instruction I, the it replaces uses of C in I with V.
However, this function did not make sure to only perform this replacement if V
dominates I. As a result, it may end up replacing uses of C in instructions
before the definition of V.
The fix is to lazily compute the dominator tree in ReplaceConstantWithInst so
that we can guard the replacement with that dominance check.
0 commit comments