https://github.com/Bryce-MW closed
https://github.com/llvm/llvm-project/pull/81656
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Bryce-MW updated
https://github.com/llvm/llvm-project/pull/81656
>From 9bea6282aae73372a80aa3d0532ae0532b4ca948 Mon Sep 17 00:00:00 2001
From: Bryce Wilson
Date: Fri, 9 Feb 2024 16:56:57 -0600
Subject: [PATCH 1/3] [clang] Allow builtin addc/subc to be constant evaluated
---
@@ -12696,6 +12696,59 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}
+ case Builtin::BI__builtin_addcb:
+ case Builtin::BI__builtin_addcs:
+ case
@@ -12696,6 +12696,59 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}
+ case Builtin::BI__builtin_addcb:
+ case Builtin::BI__builtin_addcs:
+ case
https://github.com/AaronBallman approved this pull request.
Please also add a release note to clang/docs/ReleaseNotes.rst so users know
about the new functionality. There were a few tiny nits with comments, but
otherwise this LGTM!
https://github.com/llvm/llvm-project/pull/81656
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/81656
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Bryce-MW wrote:
I swear I had meant to add tests! I did see a place that looks good to add them
before so I've done that. Which allowed me to find out that I had not done my
implementation correctly so I fixed that up.
https://github.com/llvm/llvm-project/pull/81656
https://github.com/Bryce-MW updated
https://github.com/llvm/llvm-project/pull/81656
>From 9bea6282aae73372a80aa3d0532ae0532b4ca948 Mon Sep 17 00:00:00 2001
From: Bryce Wilson
Date: Fri, 9 Feb 2024 16:56:57 -0600
Subject: [PATCH 1/2] [clang] Allow builtin addc/subc to be constant evaluated
---
tschuett wrote:
The bigger issue is that it needs a test. Unfortunately, I am less familiar
with the Clang test infrastructure.
https://github.com/llvm/llvm-project/pull/81656
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -12696,6 +12696,56 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}
+ case Builtin::BI__builtin_addcb:
+ case Builtin::BI__builtin_addcs:
+ case
@@ -12696,6 +12696,56 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}
+ case Builtin::BI__builtin_addcb:
+ case Builtin::BI__builtin_addcs:
+ case
tschuett wrote:
Sorry for the confusion, but the codegen test showed it makes sense what you
are doing.
https://github.com/llvm/llvm-project/pull/81656
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/Bryce-MW updated
https://github.com/llvm/llvm-project/pull/81656
>From 9bea6282aae73372a80aa3d0532ae0532b4ca948 Mon Sep 17 00:00:00 2001
From: Bryce Wilson
Date: Fri, 9 Feb 2024 16:56:57 -0600
Subject: [PATCH] [clang] Allow builtin addc/subc to be constant evaluated
---
@@ -12691,6 +12691,56 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}
+ case Builtin::BI__builtin_addcb:
+ case Builtin::BI__builtin_addcs:
+ case
@@ -12691,6 +12691,56 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}
+ case Builtin::BI__builtin_addcb:
+ case Builtin::BI__builtin_addcs:
+ case
@@ -12691,6 +12691,56 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}
+ case Builtin::BI__builtin_addcb:
+ case Builtin::BI__builtin_addcs:
+ case
@@ -12691,6 +12691,56 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}
+ case Builtin::BI__builtin_addcb:
+ case Builtin::BI__builtin_addcs:
+ case
@@ -12691,6 +12691,56 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}
+ case Builtin::BI__builtin_addcb:
+ case Builtin::BI__builtin_addcs:
+ case
@@ -12691,6 +12691,56 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}
+ case Builtin::BI__builtin_addcb:
+ case Builtin::BI__builtin_addcs:
+ case
tschuett wrote:
Nice trick.
https://github.com/llvm/llvm-project/pull/81656
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Bryce-MW updated
https://github.com/llvm/llvm-project/pull/81656
>From 9bea6282aae73372a80aa3d0532ae0532b4ca948 Mon Sep 17 00:00:00 2001
From: Bryce Wilson
Date: Fri, 9 Feb 2024 16:56:57 -0600
Subject: [PATCH] [clang] Allow builtin addc/subc to be constant evaluated
---
https://github.com/Bryce-MW updated
https://github.com/llvm/llvm-project/pull/81656
>From 6663b6269aad51ebf8cc0703d8594f0216cf5610 Mon Sep 17 00:00:00 2001
From: Bryce Wilson
Date: Fri, 9 Feb 2024 16:56:57 -0600
Subject: [PATCH] [clang] Allow builtin addc/subc to be constant evaluated
---
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 79fec2f8ba8ea0b0b1c2f13fb6355cb395e1d3af
a49372838fdbd4c908cddcbe0144ffaf0a83991d --
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Bryce Wilson (Bryce-MW)
Changes
There is some overlap with `*_overflow` which have the same result as these
functions with a carry in of zero, but the type inference and way of returning
results is different so it didn't seem worth
https://github.com/Bryce-MW created
https://github.com/llvm/llvm-project/pull/81656
There is some overlap with `*_overflow` which have the same result as these
functions with a carry in of zero, but the type inference and way of returning
results is different so it didn't seem worth handling
25 matches
Mail list logo