[PATCH] D14877: Fix ICE on lowering of constexpr vector splats

George Burgess IV via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 13 21:37:18 PST 2015


george.burgess.iv updated this revision to Diff 42683.
george.burgess.iv marked an inline comment as done.
george.burgess.iv added a comment.

> Changes to ExprConstant and CGExprConstant appear to be pure cleanups; please check those in as a separate change


r255314, thanks.

> When this is done, you should also be able to remove the IgnoreImpCasts and EmitScalarConversion calls in the CK_VectorSplat handling in ScalarExprEmitter::VisitCastExpr.


Yup!

Aside: I can't figure out how to get c++11 constexpr evaluation in to work with OpenCL (vector expressions apparently aren't considered ICEs in non-c++11 mode). So, the bit of special code in ExprConstant is untested at the moment. I'm open to suggestions for how to test it; I tried things like `int arr[((int4)true)[0] == -1 ? 1 : -1];`/tricks with `enable_if`, but wasn't quite able to get it to do what I wanted. :)


http://reviews.llvm.org/D14877

Files:
  include/clang/AST/OperationKinds.h
  include/clang/Sema/Sema.h
  lib/AST/Expr.cpp
  lib/AST/ExprConstant.cpp
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CGExprAgg.cpp
  lib/CodeGen/CGExprComplex.cpp
  lib/CodeGen/CGExprConstant.cpp
  lib/CodeGen/CGExprScalar.cpp
  lib/Edit/RewriteObjCFoundationAPI.cpp
  lib/Sema/SemaCast.cpp
  lib/Sema/SemaChecking.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaExprCXX.cpp
  lib/Sema/SemaOverload.cpp
  lib/StaticAnalyzer/Core/ExprEngineC.cpp
  test/CodeGenCXX/builtins-systemz-zvector.cpp
  test/CodeGenOpenCL/bool_cast.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14877.42683.patch
Type: text/x-patch
Size: 18007 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151214/298938f0/attachment-0001.bin>


More information about the cfe-commits mailing list