[llvm] Implement SPV_KHR_poison_freeze extension (PR #198037)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Thu May 28 02:27:17 PDT 2026


================
@@ -0,0 +1,16 @@
+; RUN: llc -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_poison_freeze %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_poison_freeze %s -o - -filetype=obj | spirv-val %}
+
+; Verify that the ArithmeticPoisonKHR execution mode is attached to kernel
+; entry points when SPV_KHR_poison_freeze is enabled and poison present in the
+; module.
----------------
MrSidims wrote:

I disagree. We still has separation of `OpUndef` and `OpPoisonKHR`.

Also note, that it's not necessary to have an explicit OpPoisonKHR instruction in a function/entry point to have a poisoness behaviour - poisoness behaviour can occur at runtime and it might be handled differently depending on the execution mode.

https://github.com/llvm/llvm-project/pull/198037


More information about the llvm-commits mailing list