diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2014-03-17 17:03:52 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2014-03-17 17:03:52 +0000 |
commit | ad52f4f70c90b72efbcf270152397e6b2df47170 (patch) | |
tree | e69ff09a1d0c6136fe266838b5e819be62086207 /test | |
parent | eb7876083dcfb3a69264d14c130177ecf4fc4930 (diff) | |
download | llvm-ad52f4f70c90b72efbcf270152397e6b2df47170.tar.gz llvm-ad52f4f70c90b72efbcf270152397e6b2df47170.tar.bz2 llvm-ad52f4f70c90b72efbcf270152397e6b2df47170.tar.xz |
R600/SI: Fix implementation of isInlineConstant() used by the verifier
The type of the immediates should not matter as long as the encoding is
equivalent to the encoding of one of the legal inline constants.
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/R600/v_cndmask.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/R600/v_cndmask.ll b/test/CodeGen/R600/v_cndmask.ll new file mode 100644 index 0000000000..9253f76d9c --- /dev/null +++ b/test/CodeGen/R600/v_cndmask.ll @@ -0,0 +1,13 @@ +; RUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs | FileCheck --check-prefix=SI %s + +; SI: @v_cnd_nan +; SI: V_CNDMASK_B32_e64 v{{[0-9]}}, +; SI-DAG: v{{[0-9]}} +; SI-DAG: -nan +define void @v_cnd_nan(float addrspace(1)* %out, i32 %c, float %f) { +entry: + %0 = icmp ne i32 %c, 0 + %1 = select i1 %0, float 0xFFFFFFFFE0000000, float %f + store float %1, float addrspace(1)* %out + ret void +} |