[PATCH] D89938: [DAG][PowerPC] Do not overwrite flags in `getNodeIfExists` without passing `Flags` argument

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 03:17:22 PDT 2020


qiucf added a comment.

This patch can fix the issue reflected by your case. However, if you call `getNodeIfExists` somewhere else with argument `Flags`, I guess you will still meet the problem that flags of the unrelated existing node are modified.

The optional argument `Flags` looks confusing sometimes: does it mean (1) 'I want the node with the same opcodes, operands, and flags' or (2) 'I want the node with the same opcodes and operands, apply flags to it if found'?

If (1), the node id doesn't put flags into consideration (also to `getNode`). If (2), why use `intersectFlags` and modifying the original node still looks not reasonable.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89938/new/

https://reviews.llvm.org/D89938



More information about the llvm-commits mailing list