[cfe-dev] Question about ASTContext::getPromotedIntegerType() function
jingu
jingu at codeplay.com
Tue Jul 16 11:23:57 PDT 2013
2013-07-17 오전 3:00, Eli Friedman 쓴 글:
> On Tue, Jul 16, 2013 at 9:56 AM, JinGu Kang <jingu at codeplay.com> wrote:
>> Hi Eli,
>>
>> I appreciate your comment. It's really helpful to understand the code.
>>
>> How do you feel about generating "sdiv" instruction on previous example?
> How else would you divide two signed integers? Instcombine knows how
> to optimize it to a udiv. I mean, we could hack an optimization into
> clang, but it would be the same optimization instcombine does, and
> there isn't much point to optimizing the performance of -O0 code.
>
> -Eli
I also saw that a optimization pass changed it to udiv and I wanted to
know whether clang depends on this pass.
Thanks for your good explanation, Eli. :)
Sincerely,
JinGu Kang
More information about the cfe-dev
mailing list