[Clang] Emit noundef metadata next to range metadata
authorNikita Popov <npopov@redhat.com>
Wed, 11 Jan 2023 14:19:57 +0000 (15:19 +0100)
committerNikita Popov <npopov@redhat.com>
Thu, 12 Jan 2023 09:03:05 +0000 (10:03 +0100)
commit02856565ac12e21f14f2af64ce1135ecc3c2021f
treeb5ae2cbc4506337e8170a215d156a1f1d5b8c78e
parent84a5d93f43cd92b489d3ee6327f88764364fdb26
[Clang] Emit noundef metadata next to range metadata

To preserve the previous semantics after D141386, adjust places
that currently emit !range metadata to also emit !noundef metadata.
This retains range violation as immediate undefined behavior,
rather than just poison.

Differential Revision: https://reviews.llvm.org/D141494
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/CGExpr.cpp
clang/test/CodeGenCUDA/amdgpu-workgroup-size.cu
clang/test/CodeGenCXX/attr-likelihood-if-branch-weights.cpp
clang/test/CodeGenCXX/pr12251.cpp
clang/test/CodeGenOpenCL/builtins-amdgcn.cl