[PATCH] D107187: [amdgpu] Add an enhanced conversion from i64 to f32.
    Jay Foad via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Aug  2 07:55:10 PDT 2021
    
    
  
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:2106
+  } else {
+    auto LZ = B.buildCTLZ_ZERO_UNDEF(S32, Unmerge.getReg(1));
+    auto NotAllZeros =
----------------
Can't you buildCTLZ here and let the legalizer worry about how to handle the ZERO case? In particular it would be better to do v_ffbh followed by v_min_u32 with 32, instead of a compare and select.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107187/new/
https://reviews.llvm.org/D107187
    
    
More information about the llvm-commits
mailing list