Skip to content
Commit ee0d46ae authored by Noah Goldstein's avatar Noah Goldstein
Browse files

[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
parent 1d5fa4f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment