<div dir="ltr"><div>Hi, </div><div><br></div><div>I'm trying to add a new intrinsic to the ARM backend. The intrinsic should a custom comparison.</div><div>To do so, I started with first defining the intrinsic in llvm/include/llvm/IR/intrinsicsARM.td:</div><div><br></div><div>def int_foo_cmp : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], []>;</div><div><br></div><div>The second step I did is adding a new pseudo instruction matching that intrinsic in lib/Target/ARM/ARMInstInfo.td:</div><div><br></div><div>def FOO_CMP : PseudoInst<(outs GPR:$Rd), (ins GPR:$src1, GPR:$src2), IIC_iCMPi,</div><div>                         [(set GPR:$Rd, (int_foo_cmp GPR:$src1, GPR:$src2))]>;</div><div><br></div><div>Now I am a bit lost how to proceed. I want the instrinsic to do a certain comparison chain and want to avoid any optimization on them. </div><div>Can someone guide me on how to proceed and emit machine instructions for that intrinsic?</div><div><br></div><div>Thanks & Cheers</div><div>Max</div></div>