[PATCH] D49497: [DAGCombine] optimizeSetCCOfSignedTruncationCheck(): handle ule, ugt CondCodes.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 26 06:59:01 PDT 2018
lebedev.ri added a comment.
In https://reviews.llvm.org/D49497#1176667, @spatel wrote:
> LGTM.
Thank you for the review!
================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:1888-1889
+ ISD::CondCode NewCond;
+ if (Cond == ISD::CondCode::SETULT)
+ NewCond = ISD::CondCode::SETEQ;
+ else if (Cond == ISD::CondCode::SETULE) {
----------------
spatel wrote:
> Nit: I don't think LLVM has any hard guidelines for this, but I've always felt that if any clause in an if-else sequence has braces, then all clauses should have braces for consistency. I don't see any value in omitting them in those situations, just more potential confusion/risk.
Since in LLVM `.clang-format` case the `{}` will be on the same line (as in, not on the separate/new lines),
i think that would be fine.
Repository:
rL LLVM
https://reviews.llvm.org/D49497
More information about the llvm-commits
mailing list