[PATCH] D59608: [AMDGPU] Fix clamp bit DAG operand
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 20 13:20:53 PDT 2019
arsenm requested changes to this revision.
arsenm added inline comments.
This revision now requires changes to proceed.
================
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
}
----------------
This is missing a test case
================
Comment at: llvm/test/CodeGen/AMDGPU/uaddo.ll:176
+; GCN: s_endpgm
+define amdgpu_kernel void @s_uaddo_clamp_bit(i32 addrspace(1)* %out, i1 addrspace(1)* %carryout, i32 %a, i32 %b) #0 {
+entry:
----------------
This should really use VGPR inputs
================
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
----------------
Should also cover sub version
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