[llvm] [SPIR-V] Fix division by zero on byte addressing GEP into a subbyte array (PR #202593)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 06:27:51 PDT 2026
================
@@ -0,0 +1,19 @@
+; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %}
+
+; CHECK-DAG: %[[#bool:]] = OpTypeBool
+; CHECK-DAG: %[[#int32:]] = OpTypeInt 32 0
+; CHECK-DAG: %[[#size:]] = OpConstant %[[#int32]] 8
+; CHECK-DAG: %[[#arr:]] = OpTypeArray %[[#bool]] %[[#size]]
+; CHECK-DAG: %[[#ptr:]] = OpTypePointer Function %[[#arr]]
+
+; CHECK: OpFunction
+; CHECK: OpVariable %[[#ptr]] Function
----------------
MrSidims wrote:
I would like to see, how the generated `AccessChain` instruction looks like.
https://github.com/llvm/llvm-project/pull/202593
More information about the llvm-commits
mailing list