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

Piotr Sobczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 23:43:13 PDT 2020


piotr 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);
+
----------------
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.


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