Error in v64i32 type in x86 backend

sorry to disturb again,

def VADD_256B : RI<0xFE, MRMDestReg, (outs VR2048:$dst), (ins VR2048:$src1, VR2048:$src2),
“VADD_256B\t{$dst, $src1, $src2 }”, [(set VR2048:$dst, (add VR2048:$src1, VR2048:$src2))], IIC_XADD_REG>, TB;

Yes its an opcode conflict. You’ll have to look through Intel documents and find an unused opcode. I’ve only added instructions based on a real spec so I don’t know how to make up an opcode.

Thank You.

I have seen the opcode is 8 bits and all the combinations are already used in llvm x86.

Now what to do?

Thank you. add is working fine i keep opcode=0x0F it is unused.

Sorry to disturb, but load is not matching pattern;
is the following load correct;

def VMOV_256B_RM : I<0x6F, MRMSrcMem, (outs VR2048:$dst), (ins i32mem:$src),
“vmov_256B_rm\t{$src, $dst|$dst, $src}”,
[(set VR2048:$dst, (v64i32 (scalar_to_vector (loadi32 addr:$src))))],
IIC_MOV_MEM>, EVEX;

i am getting this error;

LLVM ERROR: Cannot select: t4: v64i32,ch = load<LD256bitcast ([65 x i32]* @b to <64 x i32>*)(tbaa=<0x3fb8578>)(dereferenceable)> t0, t13, undef:i64
t13: i64 = X86ISD::Wrapper TargetGlobalAddress:i64<[65 x i32]* @b> 0
t12: i64 = TargetGlobalAddress<[65 x i32]* @b> 0
t3: i64 = undef
In function: foo

The opcode field is 8-bits, but there are multiple opcode maps specified by things like the “TB” on the end of your current instruction. There are many others like TA, VEX, XOP, etc. that you can find on other instructions.

What exactly is your end goal with making up these fake instructions?

Correct pattern is (set VR2048:$dst, (v64i32 (load addr:$src)))

Thank you so much.

As you pointed i used same opcode 0xFE with add but i added evex at the end so no error.
Now, my instructions are correctly selected

but i am getting the following errors:

Invalid prefix!
UNREACHABLE executed at /home/hameeza/Documents/PIM/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:647!
#0 0x00000000018e2c6c llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/hameeza/Documents/PIM/lib/Support/Unix/Signals.inc:402:11

What changes do i need to do in X86MCCodeEmitter.cpp file?

instead of using EVEX i used TA now no such errors.