The cast in this testcase should be eliminated: bool %test(sbyte* %A) { %B = cast sbyte* %A to int* %C = seteq int* %B, null ret bool %C }
This was easy, and I needed a break. Here's the patch: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031027/009058.html This comes up a lot in C++ programs, after inlining.