[llvm] [LoongArch] Optimize vreplgr2vr + vinsgr2vr intrinsic sequence (PR #115803)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 00:28:47 PST 2024
================
@@ -129,6 +129,7 @@ enum NodeType : unsigned {
VILVH,
VSHUF4I,
VREPLVEI,
+ VREPLGR2VR,
----------------
zhaoqi5 wrote:
If don't define a new node, an error will occur while legalizing because of the illegal `i32` operand type.
eg. : failed to promote `i32` to `i64` for operand `t5` of `llvm.loongarch.lsx.vreplgr2vr.b`.
```
Legalizing node: t8: v16i8 = llvm.loongarch.lsx.vreplgr2vr.b TargetConstant:i64<6940>, t5
Analyzing result type: v16i8
Legal result type
Analyzing operand: t5: i32 = truncate t2
Promote integer operand: t8: v16i8 = llvm.loongarch.lsx.vreplgr2vr.b TargetConstant:i64<6940>, t5
PromoteIntegerOperand Op #1: t8: v16i8 = llvm.loongarch.lsx.vreplgr2vr.b TargetConstant:i64<6940>, t5
LLVM ERROR: Do not know how to promote this operator's operand!
```
https://github.com/llvm/llvm-project/pull/115803
More information about the llvm-commits
mailing list