[PATCH] D109889: AMDGPU: Lower one copy from SCC early for SelectionDAG

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 08:32:53 PDT 2021


arsenm added a comment.

In D109889#3012452 <https://reviews.llvm.org/D109889#3012452>, @foad wrote:

>> In SelectionDAG path, we are currently using -1/0 when copying from SCC.
>> But in GlobalISel path, we are requesting 1/0 when copying from SCC.
>
> Is there a good reason for that difference? Is it related to TargetLowering::setBooleanContents? We always set ZeroOrOneBooleanContent for GCN subtargets.

The problem is "COPY from SCC" by itself is not a semantically meaningful concept. We can make up whatever we want. I think ZeroOrOneBooleanContent is a better choice, since it's not fighting an uphill battle for optimization priority, and there really is only one bit. Places that semantically need to use -1 can emit the select directly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109889



More information about the llvm-commits mailing list