[ARM] Workaround tailpredication min/max costmodel
authorDavid Green <david.green@arm.com>
Mon, 30 Aug 2021 18:19:51 +0000 (19:19 +0100)
committerDavid Green <david.green@arm.com>
Mon, 30 Aug 2021 18:19:51 +0000 (19:19 +0100)
commitefa340fbd264c1a1fc3d0c41275536693369f897
treea7eda2a0767e2cf912ede1747bffec2b9cc31874
parent83df94067d367d91dcc37e269a3d7317ebe97bb4
[ARM] Workaround tailpredication min/max costmodel

The min/max intrinsics are not yet canonical, but when they are the tail
predications analysis will change from treating them like icmp to
treating them like intrinsics. Unfortunately, they can currently produce
better code by not being tail predicated thanks to the vectorizer picking
higher VF's and the backend folding to better instructions (especially
for saturate patterns). In the long run we will need to improve the
vectorizers cost modelling, recognizing the instruction directly, but in
the meantime this treats min/max as before to prevent performance
regressions.
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/test/Transforms/PhaseOrdering/ARM/arm_mult_q15.ll [new file with mode: 0644]