[PATCH] D108200: [llvm][sve] Lowering for VLS masked extending loads

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 09:08:13 PDT 2021


paulwalker-arm added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/sve-fixed-length-masked-loads.ll:509
+  %b = load <32 x i16>, <32 x i16>* %bp
+  %ae = zext <32 x i8> %a to <32 x i16>
+  %mask = icmp eq <32 x i16> %ae, %b
----------------
DavidTruby wrote:
> paulwalker-arm wrote:
> > Is this necessary? As in, why not just change `%ap` to have the same types as `%bp`.
> > 
> > As an extension to this, once `%a` is a `<32 x i16>` do you need `%b`? I ask because the computation of `%mask` could be `%mask = icmp eq <32 x i16> %a, zeroinitializer`.  This latter point probably goes for the whole file to be honest.
> %ap needs to have the type <32 x i8> for us to test the masked extending load a few lines later; otherwise we're just performing a normal masked load which is already covered by other tests in this file.
Sure I get that but this test is testing a load that is sign extended, which corresponds to the last three lines of the test. The lines above the call to `llvm.masked.load` are just setting up the test and thus it's preferred to keep them as simple as possible.

Before the most recent change the function took the parameter `<32 x i16>* %bp` which can be used directly by the compare used to generate the mask and thus the zext can be removed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108200/new/

https://reviews.llvm.org/D108200



More information about the llvm-commits mailing list