[all-commits] [llvm/llvm-project] 9dc391: Revert "[IR] Mark add constant expressions as unde...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Jul 20 09:09:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9dc391e89c7984394e352ea1cbf948b4bbdcd8a8
      https://github.com/llvm/llvm-project/commit/9dc391e89c7984394e352ea1cbf948b4bbdcd8a8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-07-20 (Thu, 20 Jul 2023)

  Changed paths:
    M clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/lib/IR/Constants.cpp
    M llvm/test/CodeGen/Hexagon/atomic-opaque-basic.ll
    M llvm/test/Transforms/InstCombine/bswap-fold.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/constant-expr.ll
    M llvm/test/Transforms/InstSimplify/compare.ll

  Log Message:
  -----------
  Revert "[IR] Mark add constant expressions as undesirable"

This reverts commit f8a36d8c3e264c4fccf8058e699201a452ea7bb7.

I believe this is causing an assertion failure on the
sanitizer-x86_64-linux buildbot:

clang++: /b/sanitizer-x86_64-linux/build/llvm-project/llvm/include/llvm/Support/Casting.h:578: decltype(auto) llvm::cast(From *) [To = llvm::BinaryOperator, From = llvm::Value]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

  #10 0x000055bdd7e82408 canonicalizeLogicFirst(llvm::BinaryOperator&, llvm::IRBuilder<llvm::TargetFolder, llvm::IRBuilderCallbackInserter>&) /b/sanitizer-x86_64-linux/build/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2131:5
  #11 0x000055bdd7e80183 llvm::InstCombinerImpl::visitAnd(llvm::BinaryOperator&) /b/sanitizer-x86_64-linux/build/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2661:20

Likely the code is encountering a constant expression in a case it
didn't before.




More information about the All-commits mailing list