[llvm] [AMDGPU] - Add constant folding for s_bitreplicate (PR #72366)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 02:01:04 PST 2023


jayfoad wrote:

> However, I don't think I can do the same for the `s_wqm` and `s_quadmask` intrinsics, because they implicitly set SCC?

No, that's not true. The intrinsics do not set SCC. It does not make sense for an intrinsic to be defined as changing the value of some physical register, because it would be impossible to make use of that behaviour.

The definition of the intrinsics is that they just do bit twiddling on their input value to produce a result. They can be constant-folded.

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


More information about the llvm-commits mailing list