Author: Sven van Haastregt Date: 2021-01-25T12:43:30Z New Revision: b16fb1ffc3ceebdff1f570668e73f257d7f7e499
URL: https://github.com/llvm/llvm-project/commit/b16fb1ffc3ceebdff1f570668e73f257d7f7e499 DIFF: https://github.com/llvm/llvm-project/commit/b16fb1ffc3ceebdff1f570668e73f257d7f7e499.diff LOG: Revert "[clang] Fix signedness in vector bitcast evaluation" This reverts commit 14947cd04701d923a57a0161fd1967b81e00ff5e because it broke clang-cmake-armv7-quick. Added: Modified: clang/lib/AST/ExprConstant.cpp clang/test/CodeGenOpenCL/vector_literals.cl Removed: ################################################################################ diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index c1973720e49a..56181bbe1166 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -10193,7 +10193,7 @@ bool VectorExprEvaluator::VisitCastExpr(const CastExpr *E) { Elt = SValInt.rotl(i*EltSize+EltSize).zextOrTrunc(EltSize); else Elt = SValInt.rotr(i*EltSize).zextOrTrunc(EltSize); - Elts.push_back(APValue(APSInt(Elt, !EltTy->isSignedIntegerType()))); + Elts.push_back(APValue(APSInt(Elt, EltTy->isSignedIntegerType()))); } } else { return Error(E); diff --git a/clang/test/CodeGenOpenCL/vector_literals.cl b/clang/test/CodeGenOpenCL/vector_literals.cl index 3115aef2b50a..af571714368e 100644 --- a/clang/test/CodeGenOpenCL/vector_literals.cl +++ b/clang/test/CodeGenOpenCL/vector_literals.cl @@ -63,10 +63,3 @@ void vector_literals_valid() { //CHECK: store <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, <4 x float>* %V2 float4 V2 = (float4)(1); } - -void vector_literals_with_cast() { - // CHECK-LABEL: vector_literals_with_cast - // CHECK: store <2 x i32> <i32 12, i32 34>, <2 x i32>* - // CHECK: extractelement <2 x i32> %{{[0-9]+}}, i64 0 - unsigned int withCast = ((int2)((int2)(12, 34))).s0; -} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits