[PATCH] Fix Bug in SROA transformation [PR18615]

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Feb 24 05:04:25 PST 2014


On 23 February 2014 23:40, Karthik Bhat <kv.bhat at samsung.com> wrote:
>   Hi Rafael,
>   Thanks for the reduced test case. I have used the same. But i think it is important to run both with "-early-cse -instcombine -sroa" and  "-early-cse -sroa" as the crash logs are different in both cases.
>   In the 1st case i.e.  "-early-cse -instcombine -sroa"   the code assets with "Assertion `begin() + idx < end()' failed."
>   and in 2nd case i.e. "-early-cse -sroa" the code assets with  "Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"
>
>   Both the above crashes are due the same reason that in case memtransfer fails we should not insert the instruction into MemTransferSliceMap but return instead.

If they have the same underlying issue, a single test with just -sroa
is probably OK.

I will let chandler do the final review. From me, just one more thing:

> +; RUN: opt < %s -early-cse -sroa -S

You never check the output. You should just disable it with
-disable-output or pipe opt's output to FileCheck and check that sroa
is doing the right thing. If you disable it, please add a comment
saying you are just testing that we don't crash.

Cheers,
Rafael



More information about the llvm-commits mailing list