[all-commits] [llvm/llvm-project] 8eeabb: [ConstantFold] Handle identity folds at top of Con...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sun Nov 17 13:30:43 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8eeabbaf5da31f44b42f0ef7d625640570b0a620
      https://github.com/llvm/llvm-project/commit/8eeabbaf5da31f44b42f0ef7d625640570b0a620
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2019-11-17 (Sun, 17 Nov 2019)

  Changed paths:
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/test/Analysis/ConstantFolding/binop-identity-undef.ll
    M llvm/test/Transforms/InstCombine/vec_shuffle.ll

  Log Message:
  -----------
  [ConstantFold] Handle identity folds at top of ConstantFoldBinaryInst

Currently we miss folds with undef and identity values for binary ops
that do not fold to undef in general.

We can generalize the identity simplifications and do them before
checking for undef in particular.

Alive checks:
 * OR - https://rise4fun.com/Alive/8OsK
 * AND - https://rise4fun.com/Alive/e3tE

This will also allow us to remove some now redundant cases throughout
the function, but I would like to do this as follow-up. That should make
tracking down potential issues easier.

Reviewers: spatel, RKSimon, lebedev.ri

Reviewed By: spatel

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




More information about the All-commits mailing list