Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | ||
---|---|---|
1029 | We can't just fall through to the code below if RecomputePoisonFlags is set. This both does more than we need, and I believe it will produce broken IR in some cases, because it may end up moving the instruction down, making it no longer dominate other users. I believe what you'd want to do is extract the poison flag handling code below and then call it in this short-circuit code path as well. | |
llvm/test/Transforms/IndVarSimplify/iv-poison.ll | ||
4 | Include a reference to PR59777 here (e.g. in a comment). Instructions in tests should always be named, you can achieve this by running the test through -passes=instnamer. |
Extract poison fixup logic to a helper and apply it in the short-circuit case without
going through the rest of the hoisting process.
We can't just fall through to the code below if RecomputePoisonFlags is set. This both does more than we need, and I believe it will produce broken IR in some cases, because it may end up moving the instruction down, making it no longer dominate other users.
I believe what you'd want to do is extract the poison flag handling code below and then call it in this short-circuit code path as well.