llvm / llvm/llvm-project

[HLSL][LongVec] Add support for the clip intrinsic

Closed
#220,626 0 comments 0 reactions 1 assignee Claimed by @farzonl View on GitHub
HLSL
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Right now we are going to XFAIL the tests for Clang in offload
> XFAIL: OffloadTest-clang-warp-d3d12 :: Feature/HLSLLib/clip.long-vector.32.test (146 of 710)

Even though we enabled clip to accept long vectors in this pr: https://github.com/llvm/llvm-project/pull/216905/changes#diff-2607df2f2d2dab495e03c84232309bad5e0cfe5cec821548a921d7232cba185bR45

It is likely failing because of the any intrinsic.

// CHECK: define hidden void @{{.*}}test_clip_vector5{{.*}}(<5 x float> {{.*}} [[VALP:%.*]])
// CHECK: [[LOAD:%.*]] = load <5 x float>, ptr [[VALP]].addr
// CHECK-NEXT: [[FCMP:%.*]] = fcmp reassoc nnan ninf nsz arcp afn olt <5 x float> [[LOAD]], zeroinitializer
// CHECK-NEXT: [[ANYC:%.*]] = call i1 @llvm.dx.any.v5i1(<5 x i1> [[FCMP]])
// CHECK-NEXT: call void @llvm.dx.discard(i1 [[ANYC]])
//

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.