Displaying 2 results from an estimated 2 matches for "instcombinecompares_8cpp_source".
2015 Jun 10
2
[LLVMdev] should InstCombine preserve @llvm.assume?
...Note that the opt I use here is with
http://reviews.llvm.org/D10283 patched. This patch fixes a bug in
ValueTracking).
The reasons that InstCombine removes this assume call are:
1) SimplifyICmpInst proves %1 is true based on the assume call.
2) then, InstCombine (
http://llvm.org/docs/doxygen/html/InstCombineCompares_8cpp_source.html#l02649)
replaces all uses of %1 with true including the use in the assume call.
3) Somewhere later, llvm.assume(true) is considered trivially dead and thus
removed from the IR.
Step 2 looks particularly problematic to me. Removing @llvm.assume
essentially throws away the base of the proof so...
2018 Nov 20
2
A pattern for portable __builtin_add_overflow()
Hi LLVM, clang,
I'm trying to write a portable version of __builtin_add_overflow() it a way
that the compiler would
recognize the pattern and use the add_overflow intrinsic / the best
possible machine instruction.
Here are docs about these builtins:
https://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins
.
With unsigned types this is easy:
int uaddo_native(unsigned