[all-commits] [llvm/llvm-project] 2edc21: Fix altivec regression caused by D115670 in Vec Co...

Erich Keane via All-commits all-commits at lists.llvm.org
Tue Jan 4 09:53:38 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2edc21e8566be8fa9b20e0bb71a83af90ec9aa97
  Author: Erich Keane <erich.keane at intel.com>
  Date:   2022-01-04 (Tue, 04 Jan 2022)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/Sema/altivec-init.c

  Log Message:
  Fix altivec regression caused by D115670 in Vec Const Eval

The Vector Constant Evaluator assumes that all the types of its
sub-expressions are going to be Vector APValues, which holds for most
situations.  However, in the 1 examples of Altivec C compilation of
operator ++ (not allowed for other vector types), the result is an

Since the operator isn't supported for constant evaluation anyway, this
patch just fails-out of constant eval if we are in a situation where the
operand to the unary operator causes an LValue.

More information about the All-commits mailing list