[all-commits] [llvm/llvm-project] 787f86: [GlobalOpt][Evaluator] Don't create bitcast for sa...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jan 5 00:17:22 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 787f86e68cbd137077ebf206a5422787aa7d18c5
      https://github.com/llvm/llvm-project/commit/787f86e68cbd137077ebf206a5422787aa7d18c5
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-01-05 (Wed, 05 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/Evaluator.cpp
    A llvm/test/Transforms/GlobalOpt/pr52994.ll

  Log Message:
  -----------
  [GlobalOpt][Evaluator] Don't create bitcast for same type (PR52994)

isBitOrNoopPointerCastable() returns true if the types are the
same, but it's not actually possible to create a bitcast for all
such types. The assumption seems to be that the user will omit
creating the cast in that case, as it is unnecessary.

Fixes https://github.com/llvm/llvm-project/issues/52994.




More information about the All-commits mailing list