Skip to content

Commit

Permalink
[VMVX] Add support for arith.maxnumf and arith.minnumf lowering.
Browse files Browse the repository at this point in the history
Similar to what is done in CPU backend, it adds a ArithExpandOps pass to
the late stage of the pipeline. This drops the local llvm revert because
the VMVX backend can emulate the ops.

Note: the arith.maximum and arith.minimum ops are also expanded with the
change. They become a seq of cmp + select ops.

Signed-off-by: hanhanW <[email protected]>
  • Loading branch information
hanhanW committed Jul 29, 2024
1 parent 45323df commit 3a0dff0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ buildVectorVMVXTransformPassPipeline(OpPassManager &variantPassManager) {
.addPass(createCSEPass)
.addPass([]() { return createConvertVectorToSCFPass(); })
.addPass(createCanonicalizerPass)
.addPass(arith::createArithExpandOpsPass)
.addPass(memref::createExpandOpsPass);

// Handle tensor-type constants.
Expand Down

0 comments on commit 3a0dff0

Please sign in to comment.