diff options
author | Justin Holewinski <justin.holewinski@gmail.com> | 2011-10-18 13:39:20 +0000 |
---|---|---|
committer | Justin Holewinski <justin.holewinski@gmail.com> | 2011-10-18 13:39:20 +0000 |
commit | c3cab3aec09c884682c0946d7d805c360207ab9f (patch) | |
tree | 37920046eaaba993481417fd7177cb4b6ce2d6da /test/CodeGen/PTX | |
parent | 17001ce25cc205ac1cd2604492c2bce310964220 (diff) | |
download | llvm-c3cab3aec09c884682c0946d7d805c360207ab9f.tar.gz llvm-c3cab3aec09c884682c0946d7d805c360207ab9f.tar.bz2 llvm-c3cab3aec09c884682c0946d7d805c360207ab9f.tar.xz |
PTX: Fix disabling of MAD instruction selection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142352 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PTX')
-rw-r--r-- | test/CodeGen/PTX/mad-disabling.ll | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/CodeGen/PTX/mad-disabling.ll b/test/CodeGen/PTX/mad-disabling.ll index ad7b3417ec..603c3ba69f 100644 --- a/test/CodeGen/PTX/mad-disabling.ll +++ b/test/CodeGen/PTX/mad-disabling.ll @@ -1,8 +1,13 @@ -; RUN: llc < %s -march=ptx32 -mattr=+ptx20,+sm20 | grep "mad" -; RUN: llc < %s -march=ptx32 -mattr=+ptx20,+sm20,+no-fma | grep -v "mad" +; RUN: llc < %s -march=ptx32 -mattr=+ptx20,+sm20 | FileCheck %s -check-prefix=FMA +; RUN: llc < %s -march=ptx32 -mattr=+ptx20,+sm20,+no-fma | FileCheck %s -check-prefix=MUL +; RUN: llc < %s -march=ptx64 -mattr=+ptx20,+sm20 | FileCheck %s -check-prefix=FMA +; RUN: llc < %s -march=ptx64 -mattr=+ptx20,+sm20,+no-fma | FileCheck %s -check-prefix=MUL define ptx_device float @test_mul_add_f(float %x, float %y, float %z) { entry: +; FMA: mad.rn.f32 +; MUL: mul.rn.f32 +; MUL: add.rn.f32 %a = fmul float %x, %y %b = fadd float %a, %z ret float %b @@ -10,6 +15,9 @@ entry: define ptx_device double @test_mul_add_d(double %x, double %y, double %z) { entry: +; FMA: mad.rn.f64 +; MUL: mul.rn.f64 +; MUL: add.rn.f64 %a = fmul double %x, %y %b = fadd double %a, %z ret double %b |