[PATCH] D147266: [AArch64] Sink operands to allow for bitselect instructions
    Pranav Kant via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon May 15 13:00:49 PDT 2023
    
    
  
pranavk added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:14361-14363
+          for (unsigned Idx = 0; Idx < MainAnd->getNumOperands(); Idx++) {
+            if (MainAnd->getOperand(Idx) != IA) {
+              Ops.push_back(&MainAnd->getOperandUse(Idx));
----------------
dmgreen wrote:
> I think this can avoid the loop if we just use
> `Ops.push_back(&MainAnd->getOperandUse(MainAnd->getOperand(0) == IA ? 1 : 0));`
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147266/new/
https://reviews.llvm.org/D147266
    
    
More information about the cfe-commits
mailing list