When cloning instructions during jump threading, also clone and adapt any declared scopes. This is primarily important when threading loop exits, because we'll end up with two dominating scope declarations in that case (at least after additional loop rotation). This addresses a loose thread from https://reviews.llvm.org/rG2556b413a7b8#975012.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I am now tempted to think that any same-scope usage of llvm.experimental.noalias.scope should be avoided..
For something like loop-unswitch, it is not 'wrong' conceptually to have the same scope, but always cloning the scope
should be safer, with, in most cases, no impact on code quality.
clang-format: please reformat the code