[PATCH] D86878: [AMDGPU] Fix a miscompile with S_ADD/S_SUB

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 08:26:54 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1059-1063
+      bool SkipMasking = (Opc == ISD::SETCC || Opc == AMDGPUISD::FP_CLASS);
+      SkipMasking |= (Opc == ISD::AND || Opc == ISD::OR || Opc == ISD::XOR) &&
+                     (CI->getOperand(0).getOpcode() == ISD::SETCC &&
+                      CI->getOperand(1).getOpcode() == ISD::SETCC);
+
----------------
piotr wrote:
> arsenm wrote:
> > Should reuse isBoolSGPR
> isBoolSGPR() does not work for my case - I need to distinguish between two groups (AND/OR/XOR) and (SETCC/FP_CLASS), but that function returns true for both.
I'd say isBoolSGPR is buggy then. In any case, this should be moved out to a separate function


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86878/new/

https://reviews.llvm.org/D86878



More information about the llvm-commits mailing list