[GVN] Don't count debug instructions when limit the number of checked instructions
authorGuozhi Wei <carrot@google.com>
Tue, 31 Jan 2023 21:01:02 +0000 (21:01 +0000)
committerGuozhi Wei <carrot@google.com>
Tue, 31 Jan 2023 21:04:03 +0000 (21:04 +0000)
commitf494b366ff8a076a72a8e1b7a6f401686d6eb0e6
tree4db1c2fa492a6b81c9b6a67332ceae4d52af8190
parent486729ce06c1efeb3315be1b810afcddf715dacb
[GVN] Don't count debug instructions when limit the number of checked instructions

Don't count debug instructions when limit the number of checked instructions.
Otherwise the debug information may impact optimization like the test case
shows.

Differential Revision: https://reviews.llvm.org/D142787
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/test/Transforms/GVN/PRE/pre-load-dbg.ll [new file with mode: 0644]