summaryrefslogtreecommitdiff
path: root/mlir/test/python/lib/PythonTestDialect.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matthiasb@fb.com>2021-09-24 11:43:43 -0700
committerMatthias Braun <matthiasb@fb.com>2021-10-24 16:22:45 -0700
commit683994c863b8b8a46372408773e4bd65502c5193 (patch)
tree0e414746248c43e363990c30b4c539adf62441d6 /mlir/test/python/lib/PythonTestDialect.cpp
parenta461fa64bb37cffd73f683c74f6b0780379fc2ca (diff)
X86InstrInfo: Refactor and cleanup optimizeCompareInstr
This changes the first part of `optimizeCompareInstr` being split into a loop with a forward scan for cases that re-use zero flags from a producer in case of compare with zero and a backward scan for finding an instruction equivalent to a compare. The code now uses a single backward scan searching for the next instructions that reads or writes EFLAGS. Also: - Add comments giving examples for the 3 cases handled. - Check `MI` which contains the result of the zero-compare cases, instead of re-checking `IsCmpZero`. - Tweak coding style in some loops. - Add new MIR based tests that test the optimization in isolation. This also removes a check for flag readers in situations like this: ``` = SUB32rr %0, %1, implicit-def $eflags ... we no longer stop when there are $eflag users here CMP32rr %0, %1 ; will be removed ... ``` Differential Revision: https://reviews.llvm.org/D110857
Diffstat (limited to 'mlir/test/python/lib/PythonTestDialect.cpp')
0 files changed, 0 insertions, 0 deletions