[PATCH] D118807: [IRSim] Make sure that commutative intrinsics are treated as function calls without commutativity

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 10:39:52 PST 2022


paquette accepted this revision.
paquette added a comment.
This revision is now accepted and ready to land.

I think this fix is fine for the purposes of getting the crash out of the way. But I think it's possible to fix this and also support commutative intrinsics at the same time.

In IntrinsicInst.h:

  /// Return true if swapping the first two arguments to the intrinsic produces
  /// the same result.
  bool isCommutative() const {
     ...

We know that the first two arguments are the only ones that matter. So, maybe we can teach the similarity identifier to understand that? (The commutative case for intrinsics was added in D86798 <https://reviews.llvm.org/D86798>)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118807



More information about the llvm-commits mailing list