[PATCH] D86709: [GlobalISel] Extend not_cmp_fold to work on conditional expressions
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 09:18:03 PDT 2020
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:2155
+ // Check that XorSrc is the root of a tree of comparisons combined with ANDs
+ // and ORs. The suffix of RegsToNegate starting from index I is used a work
+ // list of tree nodes to visit.
----------------
paquette wrote:
> I don't think here's any reason to talk about an index `I` here; from the looks of it, the below loop can be a range-based for?
No, it's slightly tricky. It can't be a range-based for because we push more stuff into RegsToNegate inside the loop. It's a worklist algorithm, but without using a separate worklist vector.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86709/new/
https://reviews.llvm.org/D86709
More information about the llvm-commits
mailing list