[llvm-commits] [llvm] r121905 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCompares.cpp test/Transforms/InstCombine/overflow.ll

Chris Lattner clattner at apple.com
Fri Dec 17 10:36:02 PST 2010


On Dec 15, 2010, at 3:02 PM, Alistair Lynn wrote:

> Hi Owen-
> 
> If these patterns can be matched automatically, would it not be better to do the matching in the DAG combiner and get rid of the intrinsics?

We prefer to do matching at the mid-level when possible, not at codegen level (see also bswap).  Doing this *just* in dag combine would miss cases that require cross block patterns, and would make it difficult to implement CSE of "add with overflow(x,y)" with "add(x,y)" which hopefully GVN will catch in the future.

-Chris



More information about the llvm-commits mailing list