[PATCH] D148594: [X86] Transform `(cmp eq/ne trunc(X), C)` -> `(cmp eq/ne X, Zext(C))`
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 17 17:34:01 PDT 2023
goldstein.w.n created this revision.
goldstein.w.n added reviewers: pengfei, RKSimon.
Herald added a subscriber: hiraditya.
Herald added a project: All.
goldstein.w.n requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148594
Files:
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/movmsk-cmp.ll
llvm/test/CodeGen/X86/setcc-logic.ll
llvm/test/CodeGen/X86/vector-compare-all_of.ll
llvm/test/CodeGen/X86/vector-reduce-and-bool.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148594.514481.patch
Type: text/x-patch
Size: 27224 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230418/ea74088b/attachment.bin>
More information about the llvm-commits
mailing list