Fold (-x + -y) -> -(x+y) which promotes better association, fixing
[oota-llvm.git] / test / Transforms / InstCombine / getelementptr_cast.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
2 ; RUN:    notcast {} {getelementptr.*}
3
4 %G = external global [3 x sbyte]
5
6 implementation
7
8 ubyte *%foo(uint %Idx) {
9     %tmp = getelementptr ubyte* cast ([3 x sbyte]* %G to ubyte*), uint %Idx
10     ret ubyte* %tmp
11 }