[PATCH] D95634: [PowerPC][Power10] Fix XXSPLI32DX not correctly exploiting specific cases

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 10:47:20 PST 2021


nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.

LGTM as long as the nits are addressed on the commit.



================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:8611
       Subtarget.hasPrefixInstrs()) {
-    if (convertToNonDenormSingle(APSplatBits) &&
-        (Op->getValueType(0) == MVT::v2f64)) {
+    if ((Op->getValueType(0) == MVT::v2f64) &&
+        convertToNonDenormSingle(APSplatBits)) {
----------------
```
// Check the type first to short-circuit so we don't modify APSplatBits if
// this block isn't executed.
```


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:8617
       return DAG.getBitcast(Op.getValueType(), SplatNode);
     } else if (APSplatBits.getBitWidth() == 64) {
       // We may lose precision, so we have to use XXSPLTI32DX.
----------------
We can get rid of this now that the problem is fixed (i.e. this can go back to just being an `else`).


================
Comment at: llvm/test/CodeGen/PowerPC/p10-splatImm32.ll:104
 
 define dso_local <16 x i8> @test_xxsplti32dx_10() {
 ; CHECK-LABEL: test_xxsplti32dx_10:
----------------
Get rid of this test case now. It is redundant.


================
Comment at: llvm/test/CodeGen/PowerPC/p10-splatImm32.ll:114
 
 ; FIXME: It appears that there is something wrong with the computation
 ;        of the 64-bit constant to splat so we cannot emit xxsplti32dx for
----------------
Get rid of this comment now, the FIXME has been addressed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95634



More information about the llvm-commits mailing list