[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
Please register or sign in to comment