[PATCH] Don't constant fold bitcast/ptrtoint/inttoptr combinations without datalayout
Matt Arsenault
arsenm2 at gmail.com
Tue Jul 16 17:13:38 PDT 2013
On Jul 16, 2013, at 16:41 , Eli Friedman <eli.friedman at gmail.com> wrote:
> On Tue, Jul 16, 2013 at 11:57 AM, Matt Arsenault
> <Matthew.Arsenault at amd.com> wrote:
>> Hi eli.friedman,
>>
>> This is necessary to check for constantexpr inttoptr -> illegal bitcasts required for http://llvm-reviews.chandlerc.com/D1083
>>
>> For some reason, constant folding happens before the verifier is reached, so my tests for rejecting those illegal bitcasts in this case can't work.
>>
>> This change also causes a test to hit the bug that is fixed by http://llvm-reviews.chandlerc.com/D1114
>>
>> As it is right now, this introduces one inline cost test failure, which I believe will be fixed by another larger patch I have that I was going to submit later that adds the address space support there.
>
> Which test is this? It's likely to be a bug in the test if it's
> depending on our behavior here.
Transforms/Inline/inline_constprop.ll
It expects callee5 to be inlined, but with this patch it isn't anymore.
>
> Please check that FoldBitCast in lib/Analysis/ConstantFolding.cpp does
> the right thing.
>
More information about the llvm-commits
mailing list