================
@@ -563,6 +563,19 @@ static bool interp__builtin_fabs(InterpState &S, CodePtr 
OpPC,
   return true;
 }
 
+static bool interp__builtin_abs(InterpState &S, CodePtr OpPC,
+                                const InterpFrame *Frame, const Function *Func,
+                                const CallExpr *Call) {
+  PrimType ArgT = *S.getContext().classify(Call->getArg(0)->getType());
+  APSInt Val = peekToAPSInt(S.Stk, ArgT);
+  if (Val == APSInt(APSInt::getSignedMinValue(Val.getBitWidth()), false))
----------------
tbaederr wrote:

```suggestion
  if (Val == APSInt(APInt::getSignedMinValue(Val.getBitWidth()), 
/*IsUnsigned=*/false))
```

Same with the other implementation

https://github.com/llvm/llvm-project/pull/112539
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to