erichkeane added a comment.
@craig.topper : Yep, probably so in both those cases. I'm working on a patch
that includes the 2 'nots' as well, which complicates this whole section a
bunch though.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115670/new/
craig.topper added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:10393
+ if (Elt.getKind() == APValue::Int) {
+Elt.setInt(-Elt.getInt());
+ } else {
Can this be `Elt.getInt().negate()`?
Comment at:
erichkeane added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:10389
+return false;
+ case UO_Minus: {
+for (unsigned EltNum = 0; EltNum < VD->getNumElements(); ++EltNum) {
aaron.ballman wrote:
> Would it be worth handling ~ and ! as well
aaron.ballman added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:10389
+return false;
+ case UO_Minus: {
+for (unsigned EltNum = 0; EltNum < VD->getNumElements(); ++EltNum) {
Would it be worth handling ~ and ! as well given that they seem
erichkeane added a comment.
Note, my pre-merge check failure seems completely unrelated. It seems to have
some problem with the some 'go' bindings, but I don't believe that has anything
to do with this change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115670/new/
erichkeane updated this revision to Diff 394230.
erichkeane added a comment.
Enable __int128 vectors, and fix the issue of the >64 bit vectors for negation.
Also add a test for these.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115670/new/
https://reviews.llvm.org/D115670
Files:
erichkeane added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:2915
case BO_EQ:
-Result = (LHSValue == RHSValue);
+Result = -(LHSValue == RHSValue);
break;
craig.topper wrote:
> craig.topper wrote:
> > erichkeane wrote:
> > >
craig.topper added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:2915
case BO_EQ:
-Result = (LHSValue == RHSValue);
+Result = -(LHSValue == RHSValue);
break;
craig.topper wrote:
> erichkeane wrote:
> > efriedma wrote:
> > > Using
craig.topper added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:2915
case BO_EQ:
-Result = (LHSValue == RHSValue);
+Result = -(LHSValue == RHSValue);
break;
erichkeane wrote:
> efriedma wrote:
> > Using "operator=" to assign an int
erichkeane added a comment.
To add:
I DID just try to fix that thing:
[ekeane1@scsel-clx-24 clang]$ git diff
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 2b69c3727852..330772d2b10a 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++
erichkeane added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:2915
case BO_EQ:
-Result = (LHSValue == RHSValue);
+Result = -(LHSValue == RHSValue);
break;
efriedma wrote:
> Using "operator=" to assign an int to an APInt is going to
efriedma added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:2915
case BO_EQ:
-Result = (LHSValue == RHSValue);
+Result = -(LHSValue == RHSValue);
break;
Using "operator=" to assign an int to an APInt is going to lead to
erichkeane added a comment.
Note I am adding the folks who were added as reviewers the last time I did
vector constexpr work: https://reviews.llvm.org/D79755
I again looked into operator[] to simplify things, but the 'LValueBase' stuff
(seemingly required to do something like: VecTy[3] = 1;)
erichkeane created this revision.
erichkeane added reviewers: RKSimon, aaron.ballman, void, efriedma.
erichkeane requested review of this revision.
All of our boolean operations on vector types should be using something
like vcmpeqd, which results in a mask of '-1' for the 'truth' type. We are
14 matches
Mail list logo