Skip to content

Commit 12ed616

Browse files
committed
add ptx70 and sm75 predicates, update test
1 parent bfda682 commit 12ed616

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

llvm/lib/Target/NVPTX/NVPTXInstrInfo.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,8 @@ def COS_APPROX_f32 :
12521252
[(set f32:$dst, (UnaryOpAllowsApproxFn<fcos> f32:$src))]>;
12531253
def TANH_APPROX_f32 :
12541254
BasicNVPTXInst<(outs B32:$dst), (ins B32:$src), "tanh.approx.f32",
1255-
[(set f32:$dst, (UnaryOpAllowsApproxFn<ftanh> f32:$src))]>;
1255+
[(set f32:$dst, (UnaryOpAllowsApproxFn<ftanh> f32:$src))]>,
1256+
Requires<[hasPTX<70>, hasSM<75>]>;
12561257

12571258
//-----------------------------------
12581259
// Bitwise operations

llvm/test/CodeGen/NVPTX/tanhf.ll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2-
; RUN: llc < %s -mtriple=nvptx64 | FileCheck %s
3-
; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 | %ptxas-verify %}
2+
; RUN: llc < %s -mcpu=sm_75 -mattr=+ptx70 | FileCheck %s
3+
; RUN: %if ptxas-11.0 %{ llc < %s -mcpu=sm_75 -mattr=+ptx70 | %ptxas-verify -arch=sm_75 %}
44

5+
target triple = "nvptx64-nvidia-cuda"
56

67
define float @test1(float %in) local_unnamed_addr {
78
; CHECK-LABEL: test1(

0 commit comments

Comments
 (0)