[PATCH] D109214: [DAG] Fold setcc eq with ashr to compare to zero.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 8 03:54:54 PDT 2021
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:3921
+ DAG.getConstant(0, dl, OpVT),
+ Cond == ISD::SETEQ ? ISD::SETLT : ISD::SETGT);
+ }
----------------
uabelho wrote:
> The comment at line 3914 says we should use "setge" for the "setne" case, but the code actually use "SETGT"?
>
> I'm seeing a miscompile with this patch for my out of tree target and I'm not sure what the problem actually is, but the difference between the comment and the code caught my eye.
Yes it should definitely be SETGE here!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109214/new/
https://reviews.llvm.org/D109214
More information about the llvm-commits
mailing list