[PATCH] D28929: [ConstantFolding] Constant-fold llvm.sqrt(x) like other intrinsics.
Justin Lebar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 17:27:52 PST 2017
jlebar added inline comments.
Comment at: llvm/test/Transforms/InstCombine/constant-fold-math.ll:54
- ret double %x
> Leave the test, and just update the CHECK line?
The CHECK in this case would be checking that the sqrt is not constant-folded. (sqrt(-2) raises an fp exception, and we don't currently constant-fold intrinsics whose libm equivalents raise exceptions.) I didn't think this was an interesting test, because it's a limitation of the compiler that we don't currently constant-fold it, not a correctness issue.
More information about the llvm-commits