As part of this the ptrue coalescing done in SVEIntrinsicOpts has been
modified to not introduce redundant converts, since the convert removal
will no longer run after that optimisation to clean up.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for doing this! I think instcombine will be OK with altering the phi's and the walk like this.
It's a little simpler in MVE, as we end up converting predicates to/from i16, and just merge adjacent convert.to/convert.from.
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp | ||
---|---|---|
288 | Worklist isn't used, I don't think. | |
289 | auto * | |
llvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-opts-reinterpret.ll | ||
262 | Is this used? It may work fine without, and I don't see #0 used anywhere. |
Couple of things which look like they need tidying up.
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp | ||
---|---|---|
289 | Nit: Complaint from clang tidy. | |
317 | I see that the erasure of things from the worklist has been dropped, but not the worklist. Is it handled in replaceInstUsesWith? | |
326 | Nit: Comment sounds incomplete and reads the same as the code. Suggestion: "Handle reinterprets of phi nodes." or drop the comment. | |
357 | Another thing which appears not to have any uses. |
- Remove redundant code
- Satisfy 'auto' lint complaint
- Clarify comment about phis
- Add missing attributes to functions in test
Since this change I get this warning when building:
[91/249] Building CXX object lib/Targ...h64CodeGen.dir/SVEIntrinsicOpts.cpp.o /work/open_source/lldb-cross-compile/llvm-project/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp:96:16: warning: ‘static llvm::IntrinsicInst* {anonymous}::SVEIntrinsicOpts::isReinterpretToSVBool(llvm::Value*)’ defined but not used [-Wunused-function] 96 | IntrinsicInst *SVEIntrinsicOpts::isReinterpretToSVBool(Value *V) { | ^~~~~~~~~~~~~~~~
FYI in case you meant to remove/still make use of that function.
Worklist isn't used, I don't think.