[llvm] [LLVM] Make use of s_flbit_i32_b64 and s_ff1_i32_b64 (PR #75158)

Thomas Symalla via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 10:33:31 PST 2023


================
@@ -3067,6 +3067,17 @@ SDValue AMDGPUTargetLowering::LowerCTLZ_CTTZ(SDValue Op, SelectionDAG &DAG) cons
     return NewOpr;
   }
 
+  //  64-bit scalar ctlz/cttz should use S_FLBIT_I32_B64/S_FF1_I32_B64
+  //  64-bit scalar version produce 32-bit result
+  if (!(Src->isDivergent()) && Src.getValueType() == MVT::i64) {
----------------
tsymalla wrote:

The outer parenthesis around `Src->isDivergent()` should not be required.

https://github.com/llvm/llvm-project/pull/75158


More information about the llvm-commits mailing list