[all-commits] [llvm/llvm-project] 65bec0: [ConstantFold] Handle same type in ConstantFoldLoa...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Dec 10 07:40:06 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 65bec04295f1f678977151454ce852ba61149ac8
      https://github.com/llvm/llvm-project/commit/65bec04295f1f678977151454ce852ba61149ac8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/test/Transforms/InstSimplify/ConstProp/loads.ll

  Log Message:
  -----------
  [ConstantFold] Handle same type in ConstantFoldLoadThroughBitcast

Usually the case where the types are the same ends up being handled
fine because it's legal to do a trivial bitcast to the same type.
However, this is not true for aggregate types. Short-circuit the
whole code if the types match exactly to account for this.




More information about the All-commits mailing list