- truncate(smin(smax(a,b),c)) --> vqmovns(a)
- truncate(umin(a,b)) --> vqmovnu(a)
[How to indicate LLVM use VQMOVN.s16 ](https://discuss.tvm.apache.org/t/how-to-indicate-llvm-use-vqmovn-s16/9682)
Paths
| Differential D100938
neon: truncate(smin(smax(a,b),c)) --> vqmovns(a),truncate(smin(a,b)) --> vqmovnu(a) Needs ReviewPublic Authored by fantasyRqg on Apr 21 2021, 2:50 AM.
Details
Summary
[How to indicate LLVM use VQMOVN.s16 ](https://discuss.tvm.apache.org/t/how-to-indicate-llvm-use-vqmovn-s16/9682)
Diff Detail
Event TimelineComment Actions X86 has some very similar code to recognise saturated trunc pattern matchers (detectUSatPattern + detectSSatPattern) - would it make sense to move them to SelectionDAG and reuse them here? Comment Actions
I will take a look. Comment Actions Hello. Is it possible to just add a few tablegen patterns for there? As far as I can tell they are just a few nodes combined into one, and (unlike on MVE) we will not need to optimize them further. Comment Actions
I didn't mean anything for TableGen - I just mention reusing the existing code (after moving to a generic location) instead of your IsSignedSaturate/IsUnsignedSaturate lambdas
Revision Contents
Diff 339212 .gitignore
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/ARM/neon-truncate-min-max.ll
|
clang-format not found in user's PATH; not linting file.