[PATCH] D70181: [MVE] [ARM] Select VQABS
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 07:32:11 PST 2019
SjoerdMeijer added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMInstrMVE.td:1955
+let Predicates = [HasMVEInt] in {
+ def : Pat<(v16i8 (vselect
----------------
simon_tatham wrote:
> SjoerdMeijer wrote:
> > Should this be `HasMVEFloat`?
> No – VQABS is an integer instruction. The point is that it takes the absolute value of a signed integer, and gives you back something that fits in the same signed integer type, which means it has to map the largest negative value (say -128) to //one less// than its true absolute value (e.g. +127) or else it still ends up negative.
Ah yes, but think I got confused by the
ExecuteFPCheck();
in the pseudo-code of the instruction. And not that it really matters, but I guess that means the test just needs `-mattr=+mve` instead of `-mattr=+mve.fp`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70181/new/
https://reviews.llvm.org/D70181
More information about the llvm-commits
mailing list