[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 13:36:55 PST 2020


craig.topper added a comment.

In D87188#2446096 <https://reviews.llvm.org/D87188#2446096>, @spatel wrote:

> In D87188#2445506 <https://reviews.llvm.org/D87188#2445506>, @lebedev.ri wrote:
>
>> Partial rebase (without updating test coverage)
>
> Thanks for reducing!
> If I'm seeing it correctly, the codegen looks fine - the difference is in the IR icmp predicate changing from `slt` to `ult`, and that diff appears to be correct independent of whether or not we use the abs intrinsic:
> https://alive2.llvm.org/ce/z/VDDqBj
>
> So either the source/test has an incorrect expectation and/or something outside of this function is wrong?

It's also correct without the nsw/nuw flags since the inputs are i8 and extended to i32 it can't see i32 INT_MIN.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87188/new/

https://reviews.llvm.org/D87188



More information about the llvm-commits mailing list