The fix committed in r288851 doesn't cover all the cases. In particular, if we have an instruction with side effects which has a no non-dbg use not depending on the bits, we still perform RAUW destroying the dbg.value's first argument.
Prevent metadata from being replaced here to avoid the issue.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM
lib/Transforms/Scalar/BDCE.cpp | ||
---|---|---|
42–45 | I don't feel strongly about it. It does make sense as a micrp-optimization because it will avoid us computing known bits on an instruction where that will never help us. |
How about replaceNonMetadataUsesWith