[PATCH] D135633: [GlobalISel] Combine things like (z = x <= 0 ? z = x : z = 0) -> x & (x >> bw-1)
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 21:22:58 PDT 2022
aemerson added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:724-731
+ virtual bool hasAndNotCompare(LLT Ty) const { return false; }
+
+ /// LLT variant
+ virtual bool hasAndNot(LLT Ty) const {
+ // If the target has the more complex version of this operation, assume that
+ // it has this operation too.
+ return hasAndNotCompare(Ty);
----------------
arsenm wrote:
> Wouldn't the target just not add this combine if it didn't want it?
@paquette Echoing Matt's question: is this hook actually needed?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135633/new/
https://reviews.llvm.org/D135633
More information about the llvm-commits
mailing list