[PATCH] D85053: [InstSimplify] Fold abs(abs(x)) -> abs(x)
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 16:34:46 PDT 2020
craig.topper added a comment.
In D85053#2188490 <https://reviews.llvm.org/D85053#2188490>, @arsenm wrote:
> There's an isidempotent function somewhere that catches this
Yeah its called from visitUnaryIntrinsic. This intrinsic is binary because of the nsw argument. I could add it to IsIdempotentand add another call to isIdempotent to the top of visitBinaryIntrinsic, but I thought with the oddity of nsw handling abs directly might be more clear.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85053/new/
https://reviews.llvm.org/D85053
More information about the llvm-commits
mailing list