HomePhabricator

[DAG][PowerPC] Fix dropped `nsw` flag in `SimplifySetCC` by adding…

Authored by lkail on Nov 24 2020, 7:28 PM.

Description

[DAG][PowerPC] Fix dropped nsw flag in SimplifySetCC by adding doesNodeExist helper

SimplifySetCC invokes getNodeIfExists without passing Flags argument and getNodeIfExists uses a default SDNodeFlags to intersect the original flags, as a consequence, flags like nsw is dropped. Added a new helper function doesNodeExist to check if a node exists without modifying its flags.

Reviewed By: #powerpc, nemanjai

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

Details