[PATCH] D18863: Propagate Undef in llvm.cos Intrinsic

Anna Thomas via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 10:02:28 PDT 2016


anna marked an inline comment as done.

================
Comment at: lib/Analysis/ConstantFolding.cpp:1446
@@ -1445,1 +1445,3 @@
   if (Operands.size() == 1) {
+    if (isa<UndefValue>(Operands[0])) {
+      // cosine(arg) is between -1 and 1. cosine(invalid arg) is NaN
----------------
Updated the code to use isa.


http://reviews.llvm.org/D18863





More information about the llvm-commits mailing list