[all-commits] [llvm/llvm-project] a5f637: [X86] Fold AND(SRL(X, Y), 1) -> SETCC(BT(X, Y))
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Fri Apr 1 08:08:31 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a5f637bcbb7d1e08ce637f113fc117c3f4b2b110
https://github.com/llvm/llvm-project/commit/a5f637bcbb7d1e08ce637f113fc117c3f4b2b110
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-04-01 (Fri, 01 Apr 2022)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/setcc.ll
Log Message:
-----------
[X86] Fold AND(SRL(X,Y),1) -> SETCC(BT(X,Y))
As noticed on PR39174, if we're extracting a single non-constant bit index, then try to use BT+SETCC instead to avoid messing around moving the shift amount to the ECX register, using slow x86 shift ops etc.
Differential Revision: https://reviews.llvm.org/D122891
More information about the All-commits
mailing list