[PATCH] D59608: [AMDGPU] Fix clamp bit DAG operand

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 13:20:56 PDT 2019


hliao marked 2 inline comments as done.
hliao added a comment.

sorry, saw this too late, will address in another patch



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1124-1125
             SubOp = AMDGPU::V_SUB_U32_e64;
-            Opnds.push_back(Zero); // clamp bit
+            Opnds.push_back(
+                CurDAG->getTargetConstant(0, {}, MVT::i1)); // clamp bit
           }
----------------
arsenm wrote:
> This is missing a test case 
Sorry, saw this too late, I will address this in a later patch. OK?


================
Comment at: llvm/test/CodeGen/AMDGPU/uaddo.ll:178
+entry:
+  %uadd = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %a, i32 %b)
+  %val = extractvalue { i32, i1 } %uadd, 0
----------------
arsenm wrote:
> Should  also cover sub version
sure, will address that in a later patch


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59608





More information about the llvm-commits mailing list