[all-commits] [llvm/llvm-project] 50b863: [X86] Improve optimizeCompareInstr for signed comp...
Craig Topper via All-commits
all-commits at lists.llvm.org
Wed Mar 31 09:46:14 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 50b8634a99b6f2f36a3fdbea7aa7892c9b881d64
https://github.com/llvm/llvm-project/commit/50b8634a99b6f2f36a3fdbea7aa7892c9b881d64
Author: Craig Topper <craig.topper at sifive.com>
Date: 2021-03-31 (Wed, 31 Mar 2021)
Changed paths:
M llvm/lib/Target/X86/X86InstrInfo.cpp
M llvm/test/CodeGen/X86/bmi.ll
M llvm/test/CodeGen/X86/tbm_patterns.ll
Log Message:
-----------
[X86] Improve optimizeCompareInstr for signed comparisons after BMI/TBM instructions
We previously couldn't optimize out a TEST if the branch/setcc/cmov
used the overflow flag. This patches allows the TEST to be removed
if the flag producing instruction is known to clear the OF flag.
Thats what the TEST instruction would have done so that should be
equivalent.
Need to add test cases. I'll try to get back to this if I have bandwidth.
Fixes PR48768.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D94856
More information about the All-commits
mailing list