[llvm] [AMDGPU] Support bfloat comparison for ballot intrinsic (PR #165495)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 29 03:00:56 PDT 2025
================
@@ -7035,9 +7035,15 @@ static SDValue lowerBALLOTIntrinsic(const SITargetLowering &TLI, SDNode *N,
SDLoc SL(N);
if (Src.getOpcode() == ISD::SETCC) {
+ SDValue Op0 = Src.getOperand(0);
+ SDValue Op1 = Src.getOperand(1);
+ // Need to expand bfloat to float for comparison (setcc).
----------------
jayfoad wrote:
Surely generic legalization of ISD::SETCC should already promote bf16 to f32? And if that doesn't work because the ISD::SETCC hasn't been legalized yet, can't we just use the same generic machinery to promote bf16 AMDGPUISD::SETCC to f32?
https://github.com/llvm/llvm-project/pull/165495
More information about the llvm-commits
mailing list