[PATCH] D59471: [InstCombine] Fold add nuw + uadd.with.overflow
Dan Robertson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 17 10:10:55 PDT 2019
dlrobertson marked an inline comment as done.
dlrobertson added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2058-2061
+ if (Instruction *I = canonicalizeConstantArg0ToArg1(CI))
+ return I;
+ if (Instruction *I = foldIntrinsicWithOverflowCommon(II))
+ return I;
----------------
lebedev.ri wrote:
> Are these tested?
`foldIntrinsicWithOverflowCommon` is a very thin wrapper around `OptimizeOverflowCheck` which is tested in `with_overflow.ll`. I couldn't find any tests in which `canonicalizeConstantArg0ToArg1` would be used. I can add a test for it in `with_overflow.ll`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59471/new/
https://reviews.llvm.org/D59471
More information about the llvm-commits
mailing list