[PATCH] D104573: [AArch64] Optimize SVE bitcasts of unpacked types.
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 21 04:27:24 PDT 2021
paulwalker-arm added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:3510-3512
+ SDValue CastResult =
+ getSVESafeBitCast(MVT::nxv4f32, Op.getOperand(0), DAG);
+ return getSVESafeBitCast(MVT::nxv2f32, CastResult, DAG);
----------------
You may as well just remove the "Cannot cast between unpacked scalable vector types" assert from `getSVESafeBitCast`. The original intent of the assert was to catch cases where `getSVESafeBitCast` wasn't needed because a single `REINTERPRET_CAST` could do the job. The assert is clearly too generic but at the same time I deliberately didn't add isel patterns for the unpacked-unpacked-fp cases[1], so I don't see a real benefit to tightening up the assert.
[1] I know this is not consistent with i1 handling.
================
Comment at: llvm/test/CodeGen/AArch64/sve-bitcast.ll:460
+; CHECK-NEXT: ret
+ %load = load <vscale x 2 x double>, <vscale x 2 x double>* %p
+ %trunc = fptrunc <vscale x 2 x double> %load to <vscale x 2 x float>
----------------
Out of interest are the loads fundamental to these three tests?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104573/new/
https://reviews.llvm.org/D104573
More information about the llvm-commits
mailing list