[llvm-commits] [llvm] r55860 - /llvm/trunk/include/llvm/Intrinsics.td

Dale Johannesen dalej at apple.com
Fri Sep 5 14:49:30 PDT 2008


Author: johannes
Date: Fri Sep  5 16:49:30 2008
New Revision: 55860

URL: http://llvm.org/viewvc/llvm-project?rev=55860&view=rev
Log:
Mark math lib intrinsics readonly, on the grounds
that they read the rounding mode.  This is conservatively
correct, which they weren't before.  We can do more
optimization on these if we actually model the rounding
mode.


Modified:
    llvm/trunk/include/llvm/Intrinsics.td

Modified: llvm/trunk/include/llvm/Intrinsics.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=55860&r1=55859&r2=55860&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Intrinsics.td (original)
+++ llvm/trunk/include/llvm/Intrinsics.td Fri Sep  5 16:49:30 2008
@@ -193,7 +193,10 @@
                                    llvm_i64_ty, llvm_i32_ty]>;
 }
 
-let Properties = [IntrNoMem] in {
+// These functions do not actually read memory, but they are sensitive to the
+// rounding mode.  This needs to be modelled separately; in the meantime
+// declaring them as reading memory is conservatively correct.
+let Properties = [IntrReadMem] in {
   def int_sqrt : Intrinsic<[llvm_anyfloat_ty, LLVMMatchType<0>]>;
   def int_powi : Intrinsic<[llvm_anyfloat_ty, LLVMMatchType<0>, llvm_i32_ty]>;
   def int_sin  : Intrinsic<[llvm_anyfloat_ty, LLVMMatchType<0>]>;





More information about the llvm-commits mailing list