swift
396b0553 - Implement Builtin.freeze for integer and integer-vector types. (#73519)

Commit
1 year ago
Implement Builtin.freeze for integer and integer-vector types. (#73519) * Implement Builtin.freeze for integer and integer-vector types. https://llvm.org/docs/LangRef.html#freeze-instruction > If the argument is undef or poison, ‘freeze’ returns an arbitrary, but fixed, value of type ‘ty’. Otherwise, this instruction is a no-op and returns the input argument. All uses of a value returned by the same ‘freeze’ instruction are guaranteed to always observe the same value, while different ‘freeze’ instructions may yield different values. It's most importation for integer and integer-vector types because floating-point results are generally not poison (except in the case of conversion from poison integer values). However, we might want to implement this for other types as well in the future. * Make builtin.freeze TrivialUse Also fix filecheck patterns for its test to work with asserts build.
Author
Parents
Loading