[PATCH] D141829: [AArch64] fold subs ugt/ult to ands when the second operand is a mask

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 01:38:00 PST 2023


chapuni added a comment.

It miscompiled CodeGen/TargetLoweringObjectFileImpl.cpp



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:19817
+// (X & C) >u Mask --> (X & (C & (~Mask)) != 0
+// (X & C) <u Mask --> (X & (C & (~Mask)) == 0
+static SDValue performSubsToAndsCombine(SDNode *N, SDNode *SubsNode,
----------------
I think the latter is wrong.
eg. X=11 C=7 M=3


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141829



More information about the llvm-commits mailing list