[PATCH] D46917: [Fixed Point Arithmetic] Comparison and Unary Operations for Fixed Point Types

Bevin Hansson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 23 02:10:50 PDT 2018


ebevhan added inline comments.


================
Comment at: lib/CodeGen/CGExprScalar.cpp:2178
+    llvm::Value *amt =
+        llvm::ConstantInt::get(value->getType(), 1 << fbits,
+                               /*isSigned=*/type->isSignedFixedPointType());
----------------
ebevhan wrote:
> Use an APInt with the right size here instead of relying on types in the compiler.
Also, what about saturating types?


Repository:
  rC Clang

https://reviews.llvm.org/D46917





More information about the cfe-commits mailing list