[mlir][Flang][NFC] Replace use of vector.insertelement/extractelement#143272
Conversation
|
@llvm/pr-subscribers-flang-codegen @llvm/pr-subscribers-flang-fir-hlfir Author: Diego Caballero (dcaballe) ChangesThis PR is part of the last step to remove Full diff: https://github.com/llvm/llvm-project/pull/143272.diff 1 Files Affected:
diff --git a/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp b/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp
index fcc91752552c3..6090f008adb1c 100644
--- a/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp
+++ b/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp
@@ -1685,7 +1685,7 @@ PPCIntrinsicLibrary::genVecExtract(mlir::Type resultType,
if (!isNativeVecElemOrderOnLE())
uremOp = convertVectorElementOrder(builder, loc, vecTyInfo, uremOp);
- return builder.create<mlir::vector::ExtractElementOp>(loc, varg0, uremOp);
+ return builder.create<mlir::vector::ExtractOp>(loc, varg0, uremOp);
}
// VEC_INSERT
@@ -1706,8 +1706,8 @@ PPCIntrinsicLibrary::genVecInsert(mlir::Type resultType,
if (!isNativeVecElemOrderOnLE())
uremOp = convertVectorElementOrder(builder, loc, vecTyInfo, uremOp);
- auto res{builder.create<mlir::vector::InsertElementOp>(loc, argBases[0],
- varg1, uremOp)};
+ auto res{
+ builder.create<mlir::vector::InsertOp>(loc, argBases[0], varg1, uremOp)};
return builder.create<fir::ConvertOp>(loc, vecTyInfo.toFirVectorType(), res);
}
|
|
kind ping :) |
clementval
left a comment
There was a problem hiding this comment.
Look ok to me even I'm not super familiar with the ppc part of flang.
|
fyi @DanielCChen |
|
I see these LIT failures. The error looks like this: |
|
Thanks! Let me fix that. I didn't test with the powerpc target enabled |
This PR is part of the last step to remove `vector.extractelement` and `vector.insertelement` ops (RFC: https://discourse.llvm.org/t/rfc-psa-remove-vector-extractelement-and-vector-insertelement-ops-in-favor-of-vector-extract-and-vector-insert-ops) It replaces `vector.insertelement` and `vector.extractelement` with `vector.insert` and `vector.extract` in Flang. It looks like no lit tests are impacted.
13243bc to
76c78eb
Compare
|
@kkwli, it should be fixed now. Could you please verify? Thanks! |
banach-space
left a comment
There was a problem hiding this comment.
LGTM
It looks like you've addressed comments from @kkwli . I think that you should just land this if there are no further comments by tomorrow.
Thanks Diego!
@dcaballe Sorry I missed it last week. The small reproducer works now but I still see the same LIT failures. For example, subroutine vec_insert_testf32(v, x, i1)
real(4) :: v
vector(real(4)) :: x, r
integer(1) :: i1
r = vec_insert(v, x, i1)
endNow, the code generated is: There is an extra |
The extra |
… vector.extract (NFC) (#148775) See llvm/llvm-project#143272
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/34311 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/201/builds/5467 Here is the relevant piece of the build log for the reference |
…ract (NFC) (#148775) See llvm/llvm-project#143272
This PR is part of the last step to remove
vector.extractelementandvector.insertelementops (RFC: https://discourse.llvm.org/t/rfc-psa-remove-vector-extractelement-and-vector-insertelement-ops-in-favor-of-vector-extract-and-vector-insert-ops).It replaces
vector.insertelementandvector.extractelementwithvector.insertandvector.extractin Flang. It looks like no lit tests are impacted?