[llvm-commits] InstCombining, small bug alloca + bitcast

Stepan Dyatkovskiy stpworld at narod.ru
Fri May 4 11:22:04 PDT 2012


ping
Stepan Dyatkovskiy wrote:
> Hello all.
> If alloca size is calculated within the "add nsw" instruction, it will
> NOT fused to any another alloca.
>
> The test "Transorms/InstCombine/2011-06-13-nsw-alloca.ll" contains mistake.
> in "fu1" we want to ensure that alloca + bitcast may be fused to new
> alloca if allocated size was calculated with "nsw" instructions. And we
> insert "CHECK: alloca double*" here. But this test will always passed
> since there is one more alloca double* in the beginning of fu1. And by
> the way we should check "alloca double" (without asterisk).
> This test is fixed by adding CHECK-NEXT:
> CHECK: alloca double
> CHECK-NEXT: store double*
> I also added some usefull checks to test and fixed InstCombineCasts.cpp.
>
> Please find the patch for review.
>
> -Stepan.
>
>
>
>




More information about the llvm-commits mailing list