[all-commits] [llvm/llvm-project] ca827d: [X86] Convert logicalshift(x, C) -> and(x, M) iff ...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Sat Mar 2 04:44:45 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ca827d53c5524409dcca5ade3949b25f38a60fef
https://github.com/llvm/llvm-project/commit/ca827d53c5524409dcca5ade3949b25f38a60fef
Author: Simon Pilgrim <RKSimon at users.noreply.github.com>
Date: 2024-03-02 (Sat, 02 Mar 2024)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/bitcast-int-to-vector-bool-zext.ll
M llvm/test/CodeGen/X86/bitcast-int-to-vector-bool.ll
M llvm/test/CodeGen/X86/cmp-shiftX-maskX.ll
Log Message:
-----------
[X86] Convert logicalshift(x, C) -> and(x, M) iff x is allsignbits (#83596)
If we're logical shifting an all-signbits value, then we can just mask out the shifted bits.
This helps removes some unnecessary bitcasted vXi16 shifts used for vXi8 shifts (which SimplifyDemandedBits will struggle to remove through the bitcast), and allows some AVX1 shifts of 256-bit values to stay as a YMM instruction.
Noticed in codegen from #82290
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