[MachineCombiner] Don't compute the latency of transient instructions
authorGuozhi Wei <carrot@google.com>
Thu, 14 Jul 2022 17:04:44 +0000 (17:04 +0000)
committerGuozhi Wei <carrot@google.com>
Thu, 14 Jul 2022 17:08:14 +0000 (17:08 +0000)
commit2f11b3a6d7b8083be570f79f4ca18dfb2648eda3
tree18d333d01be5b8ee38efae2c95627b6aee22ea2b
parentf48ce52c4c2de8dc80e1bdd5caebbdb9f9db00ce
[MachineCombiner] Don't compute the latency of transient instructions

If an MI will not generate a target instruction, we should not compute its
latency. Then we can compute more precise instruction sequence cost, and get
better result.

Differential Revision: https://reviews.llvm.org/D129615
llvm/lib/CodeGen/MachineCombiner.cpp
llvm/test/CodeGen/AArch64/aarch64-combine-fmul-fsub.mir
llvm/test/CodeGen/AArch64/machine-combiner-transient.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/neon-mla-mls.ll
llvm/test/CodeGen/X86/machine-combiner-int-vec.ll
llvm/test/CodeGen/X86/machine-combiner-int.ll