[all-commits] [llvm/llvm-project] 7ae758: [X86][APX] Support peephole optimization with CCMP...
Feng Zou via All-commits
all-commits at lists.llvm.org
Tue Mar 11 18:24:31 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7ae75851b2e1570662261c97c13cfc65357c283d
https://github.com/llvm/llvm-project/commit/7ae75851b2e1570662261c97c13cfc65357c283d
Author: Feng Zou <feng.zou at intel.com>
Date: 2025-03-12 (Wed, 12 Mar 2025)
Changed paths:
M llvm/lib/Target/X86/X86InstrConditionalCompare.td
M llvm/lib/Target/X86/X86InstrInfo.cpp
M llvm/test/CodeGen/X86/apx/ccmp.ll
A llvm/test/CodeGen/X86/apx/optimize-compare-ccmp.mir
M llvm/test/CodeGen/X86/optimize-compare.mir
Log Message:
-----------
[X86][APX] Support peephole optimization with CCMP instruction (#129994)
This extends `opitimizeCompareInstr` to re-use previous CCMP results if
the
previous comparison was with an immediates that was 1 bigger or smaller.
Example:
```
CCMP x, 13, 2, 5
...
CCMP x, 12, 2, 5 ; can be removed if we change the SETg
SETg ... ; x > 12 changed to SETge (x >= 13) & remove the 2nd
CCMP
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list