[clang] [llvm] [AMDGPU] Add `nocreateundeforpoison` annotations (PR #166450)

Krzysztof Drewniak via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 15 09:55:58 PST 2025


================
@@ -754,6 +754,19 @@ class MSBuiltin<string name> {
   string MSBuiltinName = name;
 }
 
+/// Utility class for intrinsics that
+/// 1. Don't touch memory or any hidden state
+/// 2. Can be freely speculated, and
+/// 3. Will not create undef or poison on defined inputs.
+class PureTotalIntrinsic<list<LLVMType> ret_types,
----------------
krzysz00 wrote:

So the two problems here are
1. Nvidia's already using `PureIntrinsic` for the version of this class that doesn't `nocreateundeforpoison` and I don't want to go changing the semantics of their code for no reason
2. It does feel like having no `poison`/`undef` outputs is an extra property here

Would you prefer I tentatively rename Nvidia's version to something like NVGPUPureIntrinsic with a comment asking them to check if they can add `nocreateundeforpoison` to all of their stuff or keep the current name?

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


More information about the cfe-commits mailing list