[all-commits] [llvm/llvm-project] 5bc879: [NewGVN][PHIOFOPS] Bail out if an operand is in Op...

Konstantina Mitropoulou via All-commits all-commits at lists.llvm.org
Wed Aug 17 18:58:30 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5bc87911872d3abbf60a3dabb63b6b25d8de8ac0
  Author: Konstantina <Konstantina.Mitropoulou at amd.com>
  Date:   2022-08-17 (Wed, 17 Aug 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/NewGVN.cpp
    M llvm/test/Transforms/NewGVN/phi-of-ops-loads.ll

  Log Message:
  [NewGVN][PHIOFOPS] Bail out if an operand is in OpSafeForPHIOfOps but it is not safe for the current basic block.

NewGVN tables are not cleared out between the initial run of NewGVN and the verification. In case of phi-of-ops optimization, OpSafeForPHIOfOps goes out of sync between the two runs. One operand might not be safe for one basic block, but it might be safe for one of its successors. In this case, the operand will be added in OpSafeForPHIOfOps map. In verification phase, we reuse OpSafeForPHIOfOps without updating it again. As a result, the operand will be considered safe for phi-of-ops optimization even for the case that it is not. This patch fixes this problem.

Fix for 53807.

Reviewed By: asbirlea

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

More information about the All-commits mailing list