[PATCH] D17337: __builtin_object_size problem with pointer as argument

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 11:30:21 PST 2016


ab added a subscriber: ab.
ab added a comment.

While I don't think the builtin is intended to be used this way (that is, this behavior is intentional), the only argument I have against this patch is that it's basically wasting time on "dead" code.

That said, why not try to evaluate the objectsize call when we're about to remove it?
In the testcase, I think that we erase the objectsize call (and the alloca) before evaluating it only because InstCombine examines the alloca first.


Repository:
  rL LLVM

http://reviews.llvm.org/D17337





More information about the llvm-commits mailing list