[PATCH] D67799: [InstCombine] Fold a shifty implementation of clamp0.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 01:42:38 PDT 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1940
+ Builder.CreateICmpSLT(V, ConstantInt::getNullValue(Ty));
+ return SelectInst::Create(NewICmpInst, ConstantInt::getNullValue(Ty), V);
+ }
----------------
Hmm, super random thought.
@spatel we convert code that was written without a branch, likely very intentionally,
into a possibly-branch code. Should we not add `unpredictable` to this new `switch`?
I think it's almost correctness question..
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67799/new/
https://reviews.llvm.org/D67799
More information about the llvm-commits
mailing list