Skip to content

Conversation

@bogner
Copy link
Contributor

@bogner bogner commented Jun 11, 2024

These are the HLSL specific fixes from #93193. Thanks @klensy!

These are the HLSL specific fixes from llvm#93193. Thanks @klensy!
@llvmbot llvmbot added clang Clang issues not falling into any other category HLSL HLSL Language Support labels Jun 11, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 11, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-hlsl

Author: Justin Bogner (bogner)

Changes

These are the HLSL specific fixes from #93193. Thanks @klensy!


Full diff: https://github.com/llvm/llvm-project/pull/95155.diff

2 Files Affected:

  • (modified) clang/test/CodeGenHLSL/convergence/for.hlsl (+1-1)
  • (modified) clang/test/SemaHLSL/standard_conversion_sequences.hlsl (+2-3)
diff --git a/clang/test/CodeGenHLSL/convergence/for.hlsl b/clang/test/CodeGenHLSL/convergence/for.hlsl
index 180fae74ba751..95f9a196bdb67 100644
--- a/clang/test/CodeGenHLSL/convergence/for.hlsl
+++ b/clang/test/CodeGenHLSL/convergence/for.hlsl
@@ -92,7 +92,7 @@ void test6() {
 // CHECK:   [[C1:%[a-zA-Z0-9]+]] = call spir_func noundef i1 @_Z4condv() [[A3]] [ "convergencectrl"(token [[T1]]) ]
 // CHECK:   br i1 [[C1]], label %if.then, label %if.end
 // CHECK: if.then:
-// CHECK    call spir_func void @_Z3foov() [[A3:#[0-9]+]] [ "convergencectrl"(token [[T1]]) ]
+// CHECK:   call spir_func void @_Z3foov() [[A3:#[0-9]+]] [ "convergencectrl"(token [[T1]]) ]
 // CHECK:   br label %for.end
 // CHECK: if.end:
 // CHECK:   br label %for.inc
diff --git a/clang/test/SemaHLSL/standard_conversion_sequences.hlsl b/clang/test/SemaHLSL/standard_conversion_sequences.hlsl
index a0d398105f15d..256981d2c1e2e 100644
--- a/clang/test/SemaHLSL/standard_conversion_sequences.hlsl
+++ b/clang/test/SemaHLSL/standard_conversion_sequences.hlsl
@@ -4,9 +4,8 @@
 void test() {
   
   // CHECK: VarDecl {{.*}} used f3 'vector<float, 3>':'float __attribute__((ext_vector_type(3)))' cinit
-  // CHECK-NEXt: ImplicitCastExpr {{.*}} 'vector<float, 3>':'float __attribute__((ext_vector_type(3)))' <VectorSplat>
-  // CHECK-NEXt: ImplicitCastExpr {{.*}} 'float' <FloatingCast>
-  // CHECK-NEXt: FloatingLiteral {{.*}} 'double' 1.000000e+00
+  // CHECK-NEXT: ImplicitCastExpr {{.*}} 'vector<float, 3>':'float __attribute__((ext_vector_type(3)))' <VectorSplat>
+  // CHECK-NEXT: FloatingLiteral {{.*}} 'float' 1.000000e+00
   vector<float,3> f3 = 1.0; // No warning for splatting to a vector from a literal.
 
 

@bogner bogner requested a review from llvm-beanz June 11, 2024 18:05
// CHECK-NEXt: ImplicitCastExpr {{.*}} 'vector<float, 3>':'float __attribute__((ext_vector_type(3)))' <VectorSplat>
// CHECK-NEXt: ImplicitCastExpr {{.*}} 'float' <FloatingCast>
// CHECK-NEXt: FloatingLiteral {{.*}} 'double' 1.000000e+00
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'vector<float, 3>':'float __attribute__((ext_vector_type(3)))' <VectorSplat>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we lost a CHECK line here. Is that expected?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is intentional, as the test doesn't pass without the change. Since #91015 the literal is a float, not a double, so the implicit cast to float doesn't happen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log is truncated so we can't see the actual error, but you can see that this test is listed in the failures in the build for #93193 here: https://buildkite.com/llvm-project/github-pull-requests/builds/69357#018fdf40-9615-457d-93d7-b23bc0726a57/6-20940

Copy link
Contributor

@dmpots dmpots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bogner bogner merged commit c6ee562 into llvm:main Jun 11, 2024
@klensy
Copy link
Contributor

klensy commented Jun 12, 2024

Btw, can anyone summon me clang reviewers? Few weeks without any review is sad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category HLSL HLSL Language Support

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants