[all-commits] [llvm/llvm-project] c1e791: [DAG] FoldConstantArithmetic - fold bitlogic(bitca...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Nov 5 05:01:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c1e7911c3b36ba41c919eabddf4e745e3b473e53
      https://github.com/llvm/llvm-project/commit/c1e7911c3b36ba41c919eabddf4e745e3b473e53
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-11-05 (Fri, 05 Nov 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/ISDOpcodes.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/test/CodeGen/Thumb2/mve-pred-build-const.ll
    M llvm/test/CodeGen/X86/vector-fshl-128.ll
    M llvm/test/CodeGen/X86/vector-fshl-rot-128.ll
    M llvm/test/CodeGen/X86/vector-fshr-128.ll
    M llvm/test/CodeGen/X86/vector-fshr-rot-128.ll

  Log Message:
  -----------
  [DAG] FoldConstantArithmetic - fold bitlogic(bitcast(x),bitcast(y)) -> bitcast(bitlogic(x,y))

To constant fold bitwise logic ops where we've legalized constant build vectors to a different type (e.g. v2i64 -> v4i32), this patch adds a basic ability to peek through the bitcasts and perform the constant fold on the inner operands.

The MVE predicate v2i64 regressions will be addressed by future support for basic v2i64 type support.

One of the yak shaving fixes for D113192....

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




More information about the All-commits mailing list