[all-commits] [llvm/llvm-project] bc72a3: [Constants] Handle FNeg in getWithOperands.

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Aug 21 08:51:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bc72a3ab949e14b990c080985fc1e74475f1e7d2
      https://github.com/llvm/llvm-project/commit/bc72a3ab949e14b990c080985fc1e74475f1e7d2
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-08-21 (Fri, 21 Aug 2020)

  Changed paths:
    A clang/test/CodeGen/constantexpr-fneg.c
    M llvm/lib/IR/Constants.cpp

  Log Message:
  -----------
  [Constants] Handle FNeg in getWithOperands.

Currently ConstantExpr::getWithOperands does not handle FNeg and
subsequently treats FNeg as binary operator, leading to an assertion
failure or segmentation fault if built without assertions.

Originally I reproduced this with llvm-dis on a bitcode file, which I
unfortunately cannot share and also cannot really reduce.

But PR45426 describes the same issue and has a reproducer with Clang, so
I'll go with that.

Reviewed By: aprantl

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




More information about the All-commits mailing list