[llvm-commits] [llvm] r139005 - in /llvm/trunk: lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/pr10820.ll
    Duncan Sands 
    baldrick at free.fr
       
    Fri Sep  2 10:20:38 PDT 2011
    
    
  
Hi Jakub,
> Compare type size instead of type _store_ size to make sure that BitCastInst
> will be valid. This fixes PR10820.
thanks for fixing this.
> +define void @main() nounwind uwtable {
> +entry:
> +; CHECK: store i32
> +  store i32 402662078, i32* bitcast (i31* @g to i32*), align 8
> +  %0 = load i31* @g, align 8
> +; CHECK: store i31
> +  store i31 %0, i31* undef, align 1
> +  unreachable
> +}
To be sure that the transform kicked in, I think you should also check
that the load was removed.
Ciao, Duncan.
    
    
More information about the llvm-commits
mailing list