[all-commits] [llvm/llvm-project] 14947c: [clang] Fix signedness in vector bitcast evaluation

Sven van Haastregt via All-commits all-commits at lists.llvm.org
Mon Jan 25 04:02:08 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 14947cd04701d923a57a0161fd1967b81e00ff5e
      https://github.com/llvm/llvm-project/commit/14947cd04701d923a57a0161fd1967b81e00ff5e
  Author: Sven van Haastregt <sven.vanhaastregt at arm.com>
  Date:   2021-01-25 (Mon, 25 Jan 2021)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/CodeGenOpenCL/vector_literals.cl

  Log Message:
  -----------
  [clang] Fix signedness in vector bitcast evaluation

The included test case triggered a sign assertion on the result in
`Success()`.  This was caused by the APSInt created for a bitcast
having its signedness bit inverted.  The second APSInt constructor
argument is `isUnsigned`, so invert the result of
`isSignedIntegerType`.

Differential Revision: https://reviews.llvm.org/D95135




More information about the All-commits mailing list