[clang] [clang] Implement __builtin_stdc_rotate_left, __builtin_stdc_rotate_right (PR #160259)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 21 07:46:18 PST 2026
darkbuck wrote:
For the codegen part, when we generate `fshl`/`fshr`, why we need to generate `urem` to canonicalize that shift amount for `unsigned` count. Based on [LangRef](https://llvm.org/docs/LangRef.html#llvm-fshl-intrinsic), ``that shift amount is treated as unsigned amount modulo the element size of the arguments''. That `urem` is redundant and generate unnecessary code.
https://github.com/llvm/llvm-project/pull/160259
More information about the cfe-commits
mailing list