Displaying 3 results from an estimated 3 matches for "mycmp".
Did you mean:
mycomp
2014 May 13
2
[LLVMdev] Missed optimization opportunity in 3-way integer comparison case
...case is a simple integer comparison routine, similar to what
qsort would take to sort an integer array.
I think llvm should be taking advantage of the preceding instruction and
not placing the similar instruction again.
rev.208525, optimization level 3.
Yuri
--- C-style original code ---
int mycmp (int i1, int i2) {
if (i1<i2) {
return -1;
} else if (i1>i2) {
return 1;
}
return 0;
}
--- llvm code ---
define i32 @mycmp(i32, i32) #0 {
lbl0:
%icmp.ULT = icmp ult i32 %0, %1
br i1 %icmp.ULT, label %lbl1, label %lbl2
lbl1:
%merge = phi i32 [ -1,...
2008 Dec 05
2
[LLVMdev] (tablegen) Machine instruction without result
...profile with zero results,
//2 inputs which are of the same type (int)
def NOResSDTIntBinOp : SDTypeProfile<0, 2, [
SDTCisSameAs<0, 1>, SDTCisInt<0>
]>;
//define a node using that profile with a OutFlag
//property (which is a way to modelise e.g. HW internal CC registers?)
def MYcmpicc : SDNode<"MYISD::CMPICC", NOResSDTIntBinOp, [SDNPOutFlag]>;
//define the instruction
def MYcmp : InstMYArch<(outs), (ins IntRegs:$src1, IntRegs:$src2),
"cmp $src1 $src2;",
[(MYcmpicc IntRegs:$src1, IntRegs:$src2)]...
2008 Dec 05
0
[LLVMdev] (tablegen) Machine instruction without result
...puts which are of the same type (int)
> def NOResSDTIntBinOp : SDTypeProfile<0, 2, [
> SDTCisSameAs<0, 1>, SDTCisInt<0>
> ]>;
>
> //define a node using that profile with a OutFlag
> //property (which is a way to modelise e.g. HW internal CC registers?)
> def MYcmpicc : SDNode<"MYISD::CMPICC", NOResSDTIntBinOp,
> [SDNPOutFlag]>;
>
>
> //define the instruction
> def MYcmp : InstMYArch<(outs), (ins IntRegs:$src1, IntRegs:$src2),
> "cmp $src1 $src2;",
> [(MYcmpi...