[clang] [llvm] [Arm] Regenerate tests (NFC) (PR #121801)
Momchil Velikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 01:55:06 PST 2025
momchil-velikov wrote:
Another things that "works" is changing the codegen for `__builtin_bit_cast` (https://github.com/llvm/llvm-project/blob/32bc029be6265838833623fdd88cc665d5658dc7/clang/lib/CodeGen/CGExprScalar.cpp#L2295).
It stores a value with one type and loads it back with another type which is not handled by `mem2reg` (https://github.com/llvm/llvm-project/blob/32bc029be6265838833623fdd88cc665d5658dc7/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp#L72)
Instead it could perform a load with the original type and then emit an LLVM IR `bitcast`, just like it does for "C-style" bitcast: https://github.com/llvm/llvm-project/blob/32bc029be6265838833623fdd88cc665d5658dc7/clang/lib/CodeGen/CGExprScalar.cpp#L2425
https://github.com/llvm/llvm-project/pull/121801
More information about the llvm-commits
mailing list