[PATCH] D55844: [Fixed Point Arithmetic] Fixed Point Subtraction

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 19 20:50:24 PST 2018


rjmccall added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3397
   Value *Result;
-  if (ResultFixedSema.isSaturated()) {
-    llvm::Intrinsic::ID IID = ResultFixedSema.isSigned()
-                                  ? llvm::Intrinsic::sadd_sat
-                                  : llvm::Intrinsic::uadd_sat;
-    Result = Builder.CreateBinaryIntrinsic(IID, FullLHS, FullRHS);
+  if (BinOp->getOpcode() == BO_Add) {
+    if (ResultFixedSema.isSaturated()) {
----------------
Please go ahead and make this a covered `switch` with a bunch of unimplemented cases.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55844/new/

https://reviews.llvm.org/D55844





More information about the cfe-commits mailing list