Materialize : i1 = extract_vector_elt t37, Constant:i64<0>
... into: "ptrue p, all" + PTEST
Test bit of lane 0 can use P register directly, and the instruction “pture all”
is loop invariant, which will beneficial to SVE after hoisting out the loop.
Paths
| Differential D120891
[AArch64] Perform first active true vector combine ClosedPublic Authored by Allen on Mar 3 2022, 4:17 AM.
Details Summary Materialize : i1 = extract_vector_elt t37, Constant:i64<0> ... into: "ptrue p, all" + PTEST Test bit of lane 0 can use P register directly, and the instruction “pture all”
Diff Detail
Unit TestsFailed
Event Timeline
Comment Actions add SetCC.getOpcode() != ISD::SETCC, and now the case in file llvm/test/CodeGen/AArch64/sve-extract-element.ll is not touched Allen marked 2 inline comments as done. Comment Actionsmerge the test into file llvm/test/CodeGen/AArch64/sve-cmp-folds.ll This revision is now accepted and ready to land.Mar 7 2022, 1:09 AM
Allen marked 3 inline comments as done. This revision was landed with ongoing or failed builds.Mar 7 2022, 9:13 AM Closed by commit rGc22c8b151b97: [AArch64] Perform first active true vector combine (authored by Allen). · Explain Why This revision was automatically updated to reflect the committed changes. Allen marked 3 inline comments as done.
Revision Contents
Diff 412670 llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/sve-extract-element.ll
llvm/test/CodeGen/AArch64/sve-pture.ll
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sorry I missed this previously but I think this is bug and should be
if (!Subtarget->hasSVE() || DCI.isBeforeLegalize()) as otherwise you might create a PTEST with illegal types, which cannot be legalised and will instead cause a compiler crash.