[LICM] Sunk instructions with invalid source location.
authorCarlos Alberto Enciso <carlos.alberto.enciso@gmail.com>
Fri, 16 Jun 2023 05:19:45 +0000 (06:19 +0100)
committerCarlos Alberto Enciso <carlos.alberto.enciso@gmail.com>
Fri, 16 Jun 2023 05:25:27 +0000 (06:25 +0100)
commitc0a986a60f2fe3ec6d0c8be3cc2380e3f3395c7b
treec570bbe9b665e437b5f67723202d9ac62e6d2743
parent985daceac9cbe4d08a3f018fec47cfc371a9f60b
[LICM] Sunk instructions with invalid source location.

Building the given test case with 'clang -O2 -g' the call to
'getInOrder' is sunk out of the loop by LICM, but the source
location is not dropped.

Reviewed By: aprantl, fdeazeve

Differential Revision: https://reviews.llvm.org/D152691
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/Transforms/LICM/sink-instruction-invalid-location.ll [new file with mode: 0644]