[all-commits] [llvm/llvm-project] b9ca73: [DebugInfo] Correctly handle arrays with 0-width e...
Stephen Tozer via All-commits
all-commits at lists.llvm.org
Mon Oct 18 04:20:02 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b9ca73e1a8fd0c018b0b3eb313163da2b4ca4e09
https://github.com/llvm/llvm-project/commit/b9ca73e1a8fd0c018b0b3eb313163da2b4ca4e09
Author: Stephen Tozer <stephen.tozer at sony.com>
Date: 2021-10-18 (Mon, 18 Oct 2021)
Changed paths:
M llvm/lib/IR/Operator.cpp
M llvm/test/DebugInfo/salvage-gep.ll
Log Message:
-----------
[DebugInfo] Correctly handle arrays with 0-width elements in GEP salvaging
Fixes an issue where GEP salvaging did not properly account for GEP
instructions which stepped over array elements of width 0 (effectively a
no-op). This unnecessarily produced long expressions by appending
`... + (x * 0)` and potentially extended the number of SSA values used
in the dbg.value. This also erroneously triggered an assert in the
salvage function that the element width would be strictly positive.
These issues are resolved by simply ignoring these useless operands.
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D111809
More information about the All-commits
mailing list