[TargetLowering][ARM][AArch64] Remove usage of NoSignedWrap/NoUnsignedWrap from AVGFL...
authorCraig Topper <craig.topper@sifive.com>
Thu, 1 Jun 2023 21:18:08 +0000 (14:18 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 1 Jun 2023 21:18:08 +0000 (14:18 -0700)
commitee27e5df9e67bffbc629ea8638524ee7725d12ab
tree8bf06c3eaebb953a3b0a85b83293a45496591dfa
parent6df9b06aa81f7b6eea34652ddff819afc07a874f
[TargetLowering][ARM][AArch64] Remove usage of NoSignedWrap/NoUnsignedWrap from AVGFLOOR/CEIL transform.

Use computeOverflowForUnsignedAdd and computeOverflowForSignedAdd
instead. Unfortunately, this recomputes some known bits and sign bits
we may have already computed, but was the easiest fix without a lot
of restructuring.

This recovers the regressions from D151472.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D151858
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AArch64/arm64-vhadd.ll
llvm/test/CodeGen/AArch64/sve-hadd.ll
llvm/test/CodeGen/Thumb2/mve-vhadd.ll