[llvm] [RISCV][GISel] Add ISel supports for SHXADD from Zba extension (PR #67863)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 30 21:22:11 PDT 2023


================
@@ -235,10 +235,7 @@ def SimmShiftRightBy3XForm : SDNodeXForm<imm, [{
 }]>;
 
 // Pattern to exclude simm12 immediates from matching.
-def non_imm12 : PatLeaf<(XLenVT GPR:$a), [{
-  auto *C = dyn_cast<ConstantSDNode>(N);
-  return !C || !isInt<12>(C->getSExtValue());
-}]>;
+def non_imm12 : ComplexPattern<XLenVT, 1, "selectNonImm12", [], [], 0>;
----------------
mshockwave wrote:

Correct, using `GISelPredicateCode` was my first approach until I found that the `GlobalISelEmitter` TG backend doesn't pick that up for leaf nodes.

https://github.com/llvm/llvm-project/pull/67863


More information about the llvm-commits mailing list