This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Fix incorrect optimization for masked vmsgeu.vi with 0 immediate.
ClosedPublic

Authored by khchen on Mar 6 2022, 3:56 PM.

Details

Summary

vmsgeu.vi with 0 is always true, but in the masked with mask undisturbed
policy, we still need to keep inactive elelemt which come from maskedoff.

We could return mask directly if it's mask agnostic policy in the future.

Diff Detail

Event Timeline

khchen created this revision.Mar 6 2022, 3:56 PM
khchen requested review of this revision.Mar 6 2022, 3:56 PM
craig.topper added inline comments.Mar 6 2022, 4:17 PM
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
1077

vor -> vmor

1079

vor -> vmor

llvm/test/CodeGen/RISCV/rvv/vmsgeu-rv32.ll
2114

samm-> same?

llvm/test/CodeGen/RISCV/rvv/vmsgeu-rv64.ll
2096

samm -> same?

khchen updated this revision to Diff 413323.Mar 6 2022, 4:22 PM

Fix typos. Thanks Craig.

This revision is now accepted and ready to land.Mar 6 2022, 6:08 PM
This revision was landed with ongoing or failed builds.Mar 6 2022, 7:23 PM
This revision was automatically updated to reflect the committed changes.