Unfortunately, the current algorithm in llvm-upgrade depends on each value being preceded by its type. However, with signedness elimination, the following is quite possible: %tmp7360 = bitcast ubyte %tmp7354 to sbyte %tmp7361 = sub ubyte 0, %tmp7360 llvm-upgrade current translates this to: %tmp7360.s = bitcast i8 %x.u to i8 %tmp7361.u = sub i8 0, %tmp7360.u %tmp7360.u in the sub instruction should be %tmp7360.s, the intended value. However, since the first argument to sub is ubyte, it gets the .u suffix. llvm-as rightly declares that %tmp7360.u is undefined in the i8 type plane.
Test case for this and related things: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070101/042122.html
Mine
This is related to bug 645. They both require that llvm-upgrade get smarter about what its parsing, possibly deferring output until everything is resolved.
With the llvm-upgrade, this is now fixed. http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070122/043254.html The XFAIL from the test case has been removed and it passes.