[all-commits] [llvm/llvm-project] a1f6bb: [AArch64][GlobalISel] Emit G_ASSERT_ZEXT in assign...
Jessica Paquette via All-commits
all-commits at lists.llvm.org
Wed Feb 3 16:06:31 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a1f6bb20db14ec72e2a01731dff222565eedb2ff
https://github.com/llvm/llvm-project/commit/a1f6bb20db14ec72e2a01731dff222565eedb2ff
Author: Jessica Paquette <jpaquette at apple.com>
Date: 2021-02-03 (Wed, 03 Feb 2021)
Changed paths:
M llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
M llvm/test/CodeGen/AArch64/GlobalISel/call-lowering-zeroext.ll
Log Message:
-----------
[AArch64][GlobalISel] Emit G_ASSERT_ZEXT in assignValueToAddress for ZExt params
When we have a zeroext parameter coming in on the stack, build
```
%x = G_LOAD ...
%x_assert_zext = G_ASSERT_ZEXT %x, narrow_size
%trunc = G_TRUNC %x_assert_zext
```
Rather than just loading into the truncated type.
This allows us to optimize cases like this: https://godbolt.org/z/vfjhW8
Differential Revision: https://reviews.llvm.org/D95805
More information about the All-commits
mailing list