[PATCH] D103756: [DAG] Allow isNullOrNullSplat to see truncated zeroes

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 5 12:37:58 PDT 2021


RKSimon added a comment.

> Whilst I'm here also add a call to peekThroughBitcasts as bitcast Zero is still Zero, and removed a related TODO comment from isOneOrOneSplat as the bitcast of 1 isn't always still 1.

Is this necessary for any of the test changes? I just wonder whether we should add this separately.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:9605
+  N = peekThroughBitcasts(N);
+  ConstantSDNode *C = isConstOrConstSplat(N, AllowUndefs, true);
   return C && C->isNullValue();
----------------
/*AllowTruncation*/true ?


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

https://reviews.llvm.org/D103756



More information about the llvm-commits mailing list