E.g.
%0 = tail call i64 @llvm.aarch64.sve.cntw(i32 31) %mul = mul i64 %0, <const>
Should emit:
cntw x0, all, mul #<const>
For <const> in the range 1-16.
Patch by Kerry McLaughlin
| Paths 
 |  Differential  D71014  
[AArc64][SVE] Fold constant multiply of element count ClosedPublic Authored by c-rhodes on Dec 4 2019, 6:38 AM. 
Details Summary E.g. %0 = tail call i64 @llvm.aarch64.sve.cntw(i32 31) %mul = mul i64 %0, <const> Should emit: cntw x0, all, mul #<const> For <const> in the range 1-16. Patch by Kerry McLaughlin 
Diff Detail 
 Event Timelinec-rhodes added a parent revision: D70967: [AArch64][SVE] Implement element count intrinsics.Dec 4 2019, 6:39 AM 
 Comment Actions 
 Comment Actions LGTM! Thanks @c-rhodes 
 This revision is now accepted and ready to land.Dec 17 2019, 1:40 AM Closed by commit rG974f00a43693: [AArch64][SVE] Fold constant multiply of element count (authored by c-rhodes).  ·  Explain WhyDec 20 2019, 4:02 AM This revision was automatically updated to reflect the committed changes. c-rhodes marked an inline comment as done. 
Revision Contents 
Diff 234858 llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
 llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
 
 llvm/lib/Target/AArch64/SVEInstrFormats.td
 llvm/test/CodeGen/AArch64/sve-intrinsics-counting-elems.ll
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nit: Low/High -> Min/Max ?