[all-commits] [llvm/llvm-project] 34e724: [DAG] Fold freeze(bitcast(x)) -> bitcast(freeze(x))

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Apr 22 08:43:51 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 34e7243464083bece01ceac7959716766c1dc122
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/bitcast-int-to-vector-bool.ll

  Log Message:
  [DAG] Fold freeze(bitcast(x)) -> bitcast(freeze(x))

This is a very specific fold to fix an upstream poor codegen issue.

InstCombine has the much more flexible pushFreezeToPreventPoisonFromPropagating but I don't think we're quite there with DAG/TLI handling for canCreateUndefOrPoison/isGuaranteedNotToBeUndefOrPoison value tracking yet.

Fixes #54911

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

More information about the All-commits mailing list