[llvm-dev] Help lowering byte wise compare instruction
vivek pandya via llvm-dev
llvm-dev at lists.llvm.org
Wed Feb 15 06:49:23 PST 2017
Hello LLVM Devs,
Hope you are doing well.
I am implementing LLVM back-end for an architecture which has instruction
that performs byte by byte comparison and stores result for each byte.
pcmpbf rD, rA, rB --> bytewise comparison returning position of first match
in rd
So with this regard I wanted to find similar instruction lowering for nay
other architecture which have similar instruction.
I found some thing similar on PPC. If I am wrong kindly suggest some
example.
I am trying to understand following statement from PPCInstrInfo.td file:
def CMPRB : X_BF3_L1_RS5_RS5<31, 192, (outs crbitrc:$BF),
(ins u1imm:$L, g8rc:$rA, g8rc:$rB),
"cmprb $BF, $L, $rA, $rB", IIC_IntCompare,
[]>,
Requires<[IsISA3_0]>;
Here I am not able to understand against which DAG pattern this gets
matched ? By doing grep I don't get any code which provide me the required
info.
Basically I want to know which LLVM IR instruction or intrinsic has similar
semantics and then how I can lower it correctly.
Sincerely,
Vivek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170215/38e9958b/attachment.html>
More information about the llvm-dev
mailing list