[PATCH] D145468: [X86] Optimize (and (srl X 30) 2)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 15:10:49 PST 2023
RKSimon added inline comments.
================
Comment at: llvm/test/CodeGen/X86/and-shift.ll:56
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: shrq $30, %rax
-; X64-NEXT: andl $2, %eax
----------------
RKSimon wrote:
> We might be able to get SimplifyDemandedBits to recognise this as shrl $30, %eax (with suitable TLI checks)
DAGCombiner::visitANDLike should already handle this (it might be failing to peek through a truncation)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145468/new/
https://reviews.llvm.org/D145468
More information about the llvm-commits
mailing list