[all-commits] [llvm/llvm-project] e7195d: [LoopInterchange] Fix crash when dbg_value exists ...
Ryotaro Kasuga via All-commits
all-commits at lists.llvm.org
Wed Jul 8 00:29:21 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e7195d5d23adf9336555e7244e2fcf397111c57e
https://github.com/llvm/llvm-project/commit/e7195d5d23adf9336555e7244e2fcf397111c57e
Author: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
Date: 2026-07-08 (Wed, 08 Jul 2026)
Changed paths:
M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
A llvm/test/Transforms/LoopInterchange/debug-record-after-phi.ll
Log Message:
-----------
[LoopInterchange] Fix crash when dbg_value exists right after PHI (#208147)
When enabling reduction2mem with `-loop-interchange-reduction-to-mem`
and the input IR contains `dbg_value`s immediately after a certain PHI
node, assertion failure could be triggered due to the insertion position
of newly created PHI node. This patch fixes the issue by changing
IRBuilder ctor to be called. TBH, I'm not entirely sure what the
difference is between `IRBuilder::IRBuilder(Instruction *)` and
`IRBuilder::IRBuilder(BasicBlock *, BasicBlock::iterator)`, but judging
from the generated code, the behavior with this patch seems reasonable.
Taken over from #183273
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list