This patch adds a builtin constant that lowers to freeze(poison).
This is necessary to patch the intrinsics like e.g., mm256_castsi128_si256 to be lowered to the following sequence:
%a1 = freeze <2 x double> poison // <- would like to represent this as '__builtin_unspecified_value' in C/C++. %res = shufflevector <2 x double> %a0, <2 x double> %a1, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
Currently it is being lowered to:
%res = shufflevector <2x double> %a0, undef, <4 x i32> <i32 0, i32 1, i32 -1, i32 -1>
The current lowering may incorrectly introduce undefined behavior.
A related, previous patch was here: https://reviews.llvm.org/D130339