[PATCH] D97909: [AIX] Allow safe for 32bit P8 VSX pattern matching

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 19 21:17:30 PDT 2021


nemanjai requested changes to this revision.
nemanjai added a comment.
This revision now requires changes to proceed.

The change is straightforward, but it kind of needs another review.



================
Comment at: llvm/lib/Target/PowerPC/PPCInstrVSX.td:3195
+def : Pat<(f32 (vector_extract v4f32:$S, i64:$Idx)),
+          (f32 VectorExtractions.BE_VARIABLE_FLOAT)>;
 
----------------
Moving this here is just half the story. You will also have to add a 32-bit version of this along with the respective test. It should be straightforward to implement
`VectorExtractions.BE_32B_VARIABLE_FLOAT` - just use `RLWINM` instead of `RLDICR`.

The test to add would be something like:
```
define float @test(<4 x float> %a, i32 %idx) local_unnamed_addr #0 {
entry:
  %vecext = extractelement <4 x float> %a, i32 %idx
  ret float %vecext
}
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97909



More information about the llvm-commits mailing list