[all-commits] [llvm/llvm-project] ee0d46: [X86] Transform `(cmp eq/ne trunc(X), C)` -> `(cmp...
goldsteinn via All-commits
all-commits at lists.llvm.org
Sun Apr 23 00:26:29 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ee0d46ae5569fa433c9ca001ec2dc7cb412b95a4
https://github.com/llvm/llvm-project/commit/ee0d46ae5569fa433c9ca001ec2dc7cb412b95a4
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2023-04-23 (Sun, 23 Apr 2023)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/movmsk-cmp.ll
M llvm/test/CodeGen/X86/setcc-logic.ll
M llvm/test/CodeGen/X86/vector-compare-all_of.ll
M llvm/test/CodeGen/X86/vector-reduce-and-bool.ll
Log Message:
-----------
[X86] Transform `(cmp eq/ne trunc(X), C)` -> `(cmp eq/ne X, Zext(C))`
This previously existed for `C == 0`, but is mostly beneficial for any
`C`.
There is a slight codesize cost as we get more imm32 (as opposed to
imm8) constants in some cases. But the benefit is was get less imm16
constants (LCP stalls) and save instructions in some vec -> scalar
codegen.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D148594
More information about the All-commits
mailing list