instcombine isn't handling nan's right when folding fcmp X, X. For example, it turns this into false: define i1 %test(double %X) { %tmp = fcmp une double %X, %X ; <i1> [#uses=1] ret i1 %tmp } -Chris
Fixed, testcase here: Transforms/InstCombine/2007-01-14-FcmpSelf.ll Patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070108/042661.html -Chris