[PATCH] D101987: [DAG] Add a generic expansion for SHIFT_PARTS opcodes using funnel shifts
    Jay Foad via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu May  6 04:22:18 PDT 2021
    
    
  
foad added a comment.
The new TargetLowering::expandShiftParts LGTM. I haven't really looked at the rest of the patch. (For the record, although I'm interested in the AMDGPU target in general, I'm not interested in the R600-based subtargets.)
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:6625-6626
+
+  // If the shift amount is larger or equal than the width of a part we can't
+  // rely on the results of FSHL/FSHR. Insert a test and select the appropriate
+  // values for large shift amounts.
----------------
Nit: it's not just that we "can't rely on the results of FSHL/FSHR"; both halves of the result have to be calculated differently for large shift amounts.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101987/new/
https://reviews.llvm.org/D101987
    
    
More information about the llvm-commits
mailing list