-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changing asuint implementation to call __builtin_bit_cast
- Loading branch information
1 parent
d0619c7
commit 844a929
Showing
6 changed files
with
26 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected | ||
|
||
|
||
export uint4 test_asuint_too_many_arg(float p0, float p1) { | ||
return __builtin_hlsl_elementwise_asuint(p0, p1); | ||
// expected-error@-1 {{too many arguments to function call, expected 1, have 2}} | ||
uint4 test_asuint_too_many_arg(float p0, float p1) { | ||
return asuint(p0, p1); | ||
// expected-error@-1 {{no matching function for call to 'asuint'}} | ||
} | ||
|
||
|
||
export uint fn(double p1) { | ||
uint test_asuint_double(double p1) { | ||
return asuint(p1); | ||
// expected-error@-1 {{passing 'double' to parameter of incompatible type 'float'}} | ||
// expected-error@-1 {/clang/20/include/hlsl/hlsl_intrinsics.h} {{static assertion failed due to requirement 'sizeof(double) == 4': Input type to asuint must be 32-bit}} | ||
} | ||
|
||
export uint fn(half p1) { | ||
|
||
uint test_asuint_half(half p1) { | ||
return asuint(p1); | ||
// expected-error@-1 {{passing 'half' to parameter of incompatible type 'float'}} | ||
// expected-error@-1 {/clang/20/include/hlsl/hlsl_intrinsics.h} {{static assertion failed due to requirement 'sizeof(double) == 4': Input type to asuint must be 32-bit}} | ||
} |