]> granicus.if.org Git - llvm/commit
[AMDGPU] Fix clamp bit DAG operand
authorMichael Liao <michael.hliao@gmail.com>
Wed, 20 Mar 2019 20:18:56 +0000 (20:18 +0000)
committerMichael Liao <michael.hliao@gmail.com>
Wed, 20 Mar 2019 20:18:56 +0000 (20:18 +0000)
commit4dc029cbf0f89ca5847814e815c07bd634cd15e3
tree0b729fb645e5595ab01bc1787cbbf2b0139991f0
parentb82e24e53fc50f0623d5e9ebc9bc9b94056b6d69
[AMDGPU] Fix clamp bit DAG operand

Summary:
- Should use `targetconstant` instead of `constant` operand for clamp
  bit, which is expected as an immediate operand. Under certain
  conditions, such as a common `i1 false` constant is used in other
  place and selected before the instruction with clamp bit, register
  operand may be added instead of immediate one. Use `targetcosntant` to
  enforce that.

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59608

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356608 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
test/CodeGen/AMDGPU/uaddo.ll