[llvm] r203757 - Phase 1 of refactoring the MachineRegisterInfo iterators to make them suitable

Hans Wennborg hans at chromium.org
Thu Mar 13 12:27:04 PDT 2014


On Thu, Mar 13, 2014 at 11:27 AM, Hans Wennborg <hans at chromium.org> wrote:
> Hi Owen,
>
> On Wed, Mar 12, 2014 at 11:02 PM, Owen Anderson <resistor at mac.com> wrote:
>> Author: resistor
>> Date: Thu Mar 13 01:02:25 2014
>> New Revision: 203757
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=203757&view=rev
>> Log:
>> Phase 1 of refactoring the MachineRegisterInfo iterators to make them suitable
>> for use with C++11 range-based for-loops.
>>
>> The gist of phase 1 is to remove the skipInstruction() and skipBundle()
>> methods from these iterators, instead splitting each iterator into a version
>> that walks operands, a version that walks instructions, and a version that
>> walks bundles.  This has the result of making some "clever" loops in lib/CodeGen
>> more verbose, but also makes their iterator invalidation characteristics much
>> more obvious to the casual reader. (Making them concise again in the future is a
>> good motivating case for a pre-incrementing range adapter!)
>>
>> Phase 2 of this undertaking with consist of removing the getOperand() method,
>> and changing operator*() of the operand-walker to return a MachineOperand&.  At
>> that point, it should be possible to add range views for them that work as one
>> might expect.
>
> It seems this causes us to miscompile yasm on Windows (which we build
> and use as part of Chromium).
>
> I have no idea what's going on yet, but I'm working on a repro.

When compiling the attached .ii file like this:

clang "-cc1" "-triple" "i386-pc-win32" "-emit-obj"
"-mrelocation-model" "static" "-mdisable-fp-elim" "-fmath-errno"
"-masm-verbose" "-mconstructor-aliases" "-target-cpu" "pentium4"
"-gline-tables-only"  "-O2"  "-mstackrealign" "-fno-rtti"
"-fms-extensions" "-fms-compatibility" "-fmsc-version=1800"
"-vectorize-loops" "-vectorize-slp" "-S" "-o"
"d:\src\tmp\yasm.bitvect.asm" "-x" "c"
"d:\src\tmp\yasm.bitvect.reduced.ii" -w

I get different output before and after your commit. Specifically in
the _BitVector_from_Dec_static function, looking at the diff of asm
before and after, it seems like the spill of %esi is missing, which
could be causing the problem I see.

Do you have any idea of what could be happening here?

Thanks,
Hans
-------------- next part --------------
_BitVector_from_Dec_static:             # @BitVector_from_Dec_static
Ltmp1109:
# BB#0:                                 # %entry
	pushl	%ebp
	movl	%esp, %ebp
	pushl	%ebx
	pushl	%edi
	pushl	%esi
	subl	$84, %esp
	movl	12(%ebp), %ecx
Ltmp1110:
	movl	-12(%ecx), %edx
	movl	%edx, -28(%ebp)         # 4-byte Spill
	xorl	%eax, %eax
	testl	%edx, %edx
	je	LBB49_44
# BB#1:                                 # %if.then
	movl	16(%ebp), %esi
	movl	8(%ebp), %eax
	movl	%ecx, %edi
Ltmp1111:
	movl	-4(%edi), %ecx
Ltmp1112:
	movl	%ecx, -56(%ebp)         # 4-byte Spill
	movl	_BITS, %ecx
Ltmp1113:
	movl	%ecx, -48(%ebp)         # 4-byte Spill
	movl	(%eax), %ecx
Ltmp1114:
	movl	%ecx, -60(%ebp)         # 4-byte Spill
	movl	4(%eax), %ecx
Ltmp1115:
	movl	%ecx, -36(%ebp)         # 4-byte Spill
	movl	8(%eax), %ebx
Ltmp1116:
	movl	%ebx, -64(%ebp)         # 4-byte Spill
	movl	12(%eax), %ecx
Ltmp1117:
	movl	%ecx, -24(%ebp)         # 4-byte Spill
	movl	16(%eax), %eax
Ltmp1118:
	movl	%eax, -32(%ebp)         # 4-byte Spill
	movl	%esi, (%esp)
	calll	_strlen
	movl	%eax, %edx
	testl	%edx, %edx
	je	LBB49_2
# BB#3:                                 # %if.end
Ltmp1119:
	movzbl	(%esi), %ecx
	movl	%ecx, -68(%ebp)         # 4-byte Spill
	cmpl	$43, %ecx
	je	LBB49_6
# BB#4:                                 # %if.end
	movl	-68(%ebp), %ecx         # 4-byte Reload
	movzbl	%cl, %ecx
	cmpl	$45, %ecx
	jne	LBB49_5
LBB49_6:                                # %if.then17
Ltmp1120:
	decl	%edx
	movl	%edx, %esi
	movl	$11, %eax
	jne	LBB49_7
	jmp	LBB49_44
LBB49_2:
	movl	$11, %eax
	jmp	LBB49_44
LBB49_5:
	movl	%edx, %esi
LBB49_7:                                # %if.end22
	movl	-48(%ebp), %eax         # 4-byte Reload
	cmpl	%eax, -28(%ebp)         # 4-byte Folded Reload
	jbe	LBB49_12
# BB#8:                                 # %if.then24
Ltmp1121:
	movl	-8(%ebx), %eax
	testl	%eax, %eax
	je	LBB49_10
# BB#9:                                 # %while.body.lr.ph.i
Ltmp1122:
	shll	$2, %eax
	movl	%eax, 8(%esp)
	movl	%ebx, (%esp)
	movl	$0, 4(%esp)
	calll	_memset
LBB49_10:                               # %BitVector_Empty.exit
Ltmp1123:
	movl	-24(%ebp), %eax         # 4-byte Reload
	movl	-8(%eax), %eax
	testl	%eax, %eax
	je	LBB49_12
# BB#11:                                # %while.body.lr.ph.i155
Ltmp1124:
	shll	$2, %eax
	movl	%eax, 8(%esp)
	movl	-24(%ebp), %eax         # 4-byte Reload
	movl	%eax, (%esp)
	movl	$0, 4(%esp)
	calll	_memset
LBB49_12:                               # %if.end25
Ltmp1125:
	movl	-8(%edi), %eax
	testl	%eax, %eax
	je	LBB49_14
# BB#13:                                # %while.body.lr.ph.i161
Ltmp1126:
	shll	$2, %eax
	movl	%eax, 8(%esp)
	movl	%edi, (%esp)
	movl	$0, 4(%esp)
	calll	_memset
LBB49_14:                               # %BitVector_Empty.exit163
Ltmp1127:
	movl	_EXP10, %eax
	movl	-36(%ebp), %ecx         # 4-byte Reload
	movl	%eax, (%ecx)
	movl	%esi, %edx
Ltmp1128:
	testl	%edx, %edx
	je	LBB49_15
# BB#16:                                # %while.body.lr.ph.lr.ph
Ltmp1129:
	addl	%edx, -20(%ebp)         # 4-byte Folded Spill
Ltmp1130:
	movl	-56(%ebp), %eax         # 4-byte Reload
	notl	%eax
	movl	%eax, -72(%ebp)         # 4-byte Spill
	movl	$0, -44(%ebp)           # 4-byte Folded Spill
LBB49_17:                               # %while.body
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB49_20 Depth 2
	xorl	%edi, %edi
	movb	$1, %al
Ltmp1131:
	movl	%eax, -40(%ebp)         # 4-byte Spill
	testl	%edx, %edx
	jne	LBB49_19
# BB#18:                                #   in Loop: Header=BB49_17 Depth=1
	xorl	%eax, %eax
	jmp	LBB49_25
	.align	16, 0x90
LBB49_19:                               # %land.rhs33.lr.ph
                                        #   in Loop: Header=BB49_17 Depth=1
	movl	%edx, %ecx
	xorl	%edi, %edi
	movl	$1, %edx
Ltmp1132:
	movl	_LOG10, %ebx
	movl	-20(%ebp), %esi         # 4-byte Reload
	.align	16, 0x90
LBB49_20:                               # %land.rhs33
                                        #   Parent Loop BB49_17 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
Ltmp1133:
	testl	%ebx, %ebx
	je	LBB49_21
# BB#22:                                # %while.body38
                                        #   in Loop: Header=BB49_20 Depth=2
	movl	%edi, -20(%ebp)         # 4-byte Spill
Ltmp1134:
	movzbl	-1(%esi), %edi
Ltmp1135:
	addl	$-48, %edi
	cmpl	$9, %edi
	movl	$11, %eax
	ja	LBB49_30
# BB#23:                                # %if.then45
                                        #   in Loop: Header=BB49_20 Depth=2
Ltmp1136:
	decl	%ebx
Ltmp1137:
	decl	%esi
	decl	%ecx
Ltmp1138:
	imull	%edx, %edi
	movl	-20(%ebp), %eax         # 4-byte Reload
	addl	%edi, %eax
	movl	%eax, %edi
Ltmp1139:
	imull	$10, %edx, %edx
Ltmp1140:
	testl	%ecx, %ecx
	jne	LBB49_20
# BB#24:                                #   in Loop: Header=BB49_17 Depth=1
	movl	%esi, -20(%ebp)         # 4-byte Spill
	xorl	%eax, %eax
	movl	-64(%ebp), %ebx         # 4-byte Reload
	jmp	LBB49_25
LBB49_21:                               #   in Loop: Header=BB49_17 Depth=1
	movl	%esi, -20(%ebp)         # 4-byte Spill
	movl	$0, -40(%ebp)           # 4-byte Folded Spill
	movl	-64(%ebp), %ebx         # 4-byte Reload
	movl	%ecx, %eax
LBB49_25:                               # %if.then49
                                        #   in Loop: Header=BB49_17 Depth=1
	movl	%eax, -52(%ebp)         # 4-byte Spill
Ltmp1141:
	movl	-44(%ebp), %eax         # 4-byte Reload
	testb	$1, %al
	je	LBB49_26
# BB#28:                                # %if.end60
                                        #   in Loop: Header=BB49_17 Depth=1
	movl	-60(%ebp), %esi         # 4-byte Reload
Ltmp1142:
	movl	%edi, (%esi)
Ltmp1143:
	movl	-24(%ebp), %eax         # 4-byte Reload
	movl	%eax, 4(%esp)
	movl	-32(%ebp), %edi         # 4-byte Reload
	movl	%edi, (%esp)
	calll	_BitVector_Copy
Ltmp1144:
	movl	%esi, 8(%esp)
	movl	%edi, 4(%esp)
	movl	%ebx, (%esp)
	movl	$0, 12(%esp)
	calll	_BitVector_Mul_Pos
	testl	%eax, %eax
	movl	-20(%ebp), %edi         # 4-byte Reload
	je	LBB49_29
	jmp	LBB49_30
	.align	16, 0x90
LBB49_26:                               # %if.else53
                                        #   in Loop: Header=BB49_17 Depth=1
	movl	-48(%ebp), %eax         # 4-byte Reload
	cmpl	%eax, -28(%ebp)         # 4-byte Folded Reload
Ltmp1145:
	movl	%edi, (%ebx)
	movl	%edi, %eax
	movl	-20(%ebp), %edi         # 4-byte Reload
	ja	LBB49_29
# BB#27:                                # %if.else53
                                        #   in Loop: Header=BB49_17 Depth=1
	andl	-72(%ebp), %eax         # 4-byte Folded Reload
	movl	$12, %eax
	jne	LBB49_44
LBB49_29:                               # %if.then62
                                        #   in Loop: Header=BB49_17 Depth=1
Ltmp1146:
	movl	$0, -16(%ebp)
	leal	-16(%ebp), %eax
Ltmp1147:
	movl	%eax, 16(%esp)
	movl	%ebx, 8(%esp)
	movl	12(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	%eax, (%esp)
	movl	$0, 12(%esp)
	calll	_BitVector_compute
Ltmp1148:
	movl	-16(%ebp), %eax
	testl	%eax, %eax
	setne	%cl
	movl	$12, %edx
	cmovnel	%edx, %eax
	movl	-40(%ebp), %edx         # 4-byte Reload
	orb	%dl, %cl
	movzbl	%cl, %ecx
	cmpl	$1, %ecx
	je	LBB49_30
# BB#33:                                # %if.then69
                                        #   in Loop: Header=BB49_17 Depth=1
	movl	%edi, -20(%ebp)         # 4-byte Spill
Ltmp1149:
	movl	-44(%ebp), %eax         # 4-byte Reload
	testb	$1, %al
	je	LBB49_34
# BB#31:                                # %while.cond.backedge
                                        #   in Loop: Header=BB49_17 Depth=1
	movl	-24(%ebp), %esi         # 4-byte Reload
Ltmp1150:
	movl	%esi, 4(%esp)
	movl	-32(%ebp), %edi         # 4-byte Reload
	movl	%edi, (%esp)
	calll	_BitVector_Copy
Ltmp1151:
	movl	-36(%ebp), %eax         # 4-byte Reload
	movl	%eax, 8(%esp)
	movl	%edi, 4(%esp)
	movl	%esi, (%esp)
	movl	$0, 12(%esp)
	calll	_BitVector_Mul_Pos
	testl	%eax, %eax
Ltmp1152:
	sete	%cl
	jne	LBB49_35
# BB#32:                                # %while.cond.backedge
                                        #   in Loop: Header=BB49_17 Depth=1
	movl	-52(%ebp), %edx         # 4-byte Reload
	testl	%edx, %edx
	jne	LBB49_17
	jmp	LBB49_35
LBB49_34:                               # %while.cond.outer.backedge
                                        #   in Loop: Header=BB49_17 Depth=1
Ltmp1153:
	movl	-36(%ebp), %eax         # 4-byte Reload
	movl	(%eax), %eax
	movl	-24(%ebp), %ecx         # 4-byte Reload
	movl	%eax, (%ecx)
	xorl	%eax, %eax
	movb	$1, %cl
	movl	%ecx, -44(%ebp)         # 4-byte Spill
	movl	-52(%ebp), %edx         # 4-byte Reload
Ltmp1154:
	testl	%edx, %edx
	movb	$1, %cl
	jne	LBB49_17
	jmp	LBB49_35
LBB49_30:                               # %while.cond.backedge.thread
	testl	%eax, %eax
	sete	%cl
	jmp	LBB49_35
LBB49_15:
	movb	$1, %cl
	xorl	%eax, %eax
LBB49_35:                               # %while.end79
Ltmp1155:
	testb	%cl, %cl
	je	LBB49_44
# BB#36:                                # %while.end79
	movl	-68(%ebp), %ecx         # 4-byte Reload
	movzbl	%cl, %ecx
	cmpl	$45, %ecx
	jne	LBB49_44
# BB#37:                                # %if.then83
	movl	12(%ebp), %edi
Ltmp1156:
	movl	-8(%edi), %ecx
	testl	%ecx, %ecx
	movl	$-1, %edx
	je	LBB49_43
# BB#38:
Ltmp1157:
	movl	-4(%edi), %edx
	movl	%edx, -24(%ebp)         # 4-byte Spill
	movl	$1, %ebx
	movl	%ecx, -20(%ebp)         # 4-byte Spill
	movl	%ecx, %esi
	.align	16, 0x90
LBB49_39:                               # %while.body.i
                                        # =>This Inner Loop Header: Depth=1
Ltmp1158:
	decl	%esi
Ltmp1159:
	movl	(%edi), %ecx
	movl	%ecx, %edx
	notl	%edx
	movl	%edx, (%edi)
	xorl	%edx, %edx
Ltmp1160:
	testl	%ebx, %ebx
	je	LBB49_41
# BB#40:                                # %if.then3.i
                                        #   in Loop: Header=BB49_39 Depth=1
Ltmp1161:
	movl	%ecx, %edx
	negl	%edx
	testl	%ecx, %ecx
	movl	%edx, (%edi)
	sete	%cl
	movzbl	%cl, %edx
LBB49_41:                               # %if.end.i
                                        #   in Loop: Header=BB49_39 Depth=1
Ltmp1162:
	addl	$4, %edi
Ltmp1163:
	testl	%esi, %esi
	movl	%edx, %ebx
	jne	LBB49_39
# BB#42:                                # %while.end.i
	movl	12(%ebp), %edi
Ltmp1164:
	movl	-20(%ebp), %ecx         # 4-byte Reload
	movl	-24(%ebp), %edx         # 4-byte Reload
	andl	%edx, -4(%edi,%ecx,4)
Ltmp1165:
	movl	-8(%edi), %edx
Ltmp1166:
	decl	%edx
LBB49_43:                               # %BitVector_Negate.exit
	movl	-56(%ebp), %esi         # 4-byte Reload
Ltmp1167:
	movl	%esi, %ecx
	shrl	%ecx
	notl	%ecx
	andl	%esi, %ecx
	testl	(%edi,%edx,4), %ecx
	movl	$12, %ecx
	cmovel	%ecx, %eax
LBB49_44:                               # %return
Ltmp1168:
	addl	$84, %esp
	popl	%esi
	popl	%edi
	popl	%ebx
	popl	%ebp
	retl
Ltmp1169:
-------------- next part --------------
_BitVector_from_Dec_static:             # @BitVector_from_Dec_static
Ltmp1109:
# BB#0:                                 # %entry
	pushl	%ebp
	movl	%esp, %ebp
	pushl	%ebx
	pushl	%edi
	pushl	%esi
	subl	$84, %esp
	movl	12(%ebp), %ecx
Ltmp1110:
	movl	-12(%ecx), %edx
	movl	%edx, -28(%ebp)         # 4-byte Spill
	xorl	%eax, %eax
	testl	%edx, %edx
	je	LBB49_45
# BB#1:                                 # %if.then
	movl	16(%ebp), %esi
	movl	8(%ebp), %eax
	movl	%ecx, %edi
Ltmp1111:
	movl	-4(%edi), %ecx
Ltmp1112:
	movl	%ecx, -56(%ebp)         # 4-byte Spill
	movl	_BITS, %ecx
Ltmp1113:
	movl	%ecx, -48(%ebp)         # 4-byte Spill
	movl	(%eax), %ecx
Ltmp1114:
	movl	%ecx, -60(%ebp)         # 4-byte Spill
	movl	4(%eax), %ecx
Ltmp1115:
	movl	%ecx, -36(%ebp)         # 4-byte Spill
	movl	8(%eax), %ebx
Ltmp1116:
	movl	%ebx, -64(%ebp)         # 4-byte Spill
	movl	12(%eax), %ecx
Ltmp1117:
	movl	%ecx, -24(%ebp)         # 4-byte Spill
	movl	16(%eax), %eax
Ltmp1118:
	movl	%eax, -32(%ebp)         # 4-byte Spill
	movl	%esi, (%esp)
	calll	_strlen
	movl	%eax, %edx
	testl	%edx, %edx
	je	LBB49_2
# BB#3:                                 # %if.end
Ltmp1119:
	movzbl	(%esi), %ecx
	movl	%esi, -20(%ebp)         # 4-byte Spill
	movl	%ecx, -68(%ebp)         # 4-byte Spill
	cmpl	$43, %ecx
	je	LBB49_6
# BB#4:                                 # %if.end
	movl	-68(%ebp), %ecx         # 4-byte Reload
	movzbl	%cl, %ecx
	cmpl	$45, %ecx
	jne	LBB49_5
LBB49_6:                                # %if.then17
Ltmp1120:
	decl	%edx
	movl	%edx, %esi
	movl	16(%ebp), %ecx
	movl	$11, %eax
	je	LBB49_45
# BB#7:
Ltmp1121:
	incl	%ecx
	movl	%ecx, -20(%ebp)         # 4-byte Spill
	jmp	LBB49_8
LBB49_2:
	movl	$11, %eax
	jmp	LBB49_45
LBB49_5:
	movl	%edx, %esi
LBB49_8:                                # %if.end22
	movl	-48(%ebp), %eax         # 4-byte Reload
	cmpl	%eax, -28(%ebp)         # 4-byte Folded Reload
	jbe	LBB49_13
# BB#9:                                 # %if.then24
Ltmp1122:
	movl	-8(%ebx), %eax
	testl	%eax, %eax
	je	LBB49_11
# BB#10:                                # %while.body.lr.ph.i
Ltmp1123:
	shll	$2, %eax
	movl	%eax, 8(%esp)
	movl	%ebx, (%esp)
	movl	$0, 4(%esp)
	calll	_memset
LBB49_11:                               # %BitVector_Empty.exit
Ltmp1124:
	movl	-24(%ebp), %eax         # 4-byte Reload
	movl	-8(%eax), %eax
	testl	%eax, %eax
	je	LBB49_13
# BB#12:                                # %while.body.lr.ph.i155
Ltmp1125:
	shll	$2, %eax
	movl	%eax, 8(%esp)
	movl	-24(%ebp), %eax         # 4-byte Reload
	movl	%eax, (%esp)
	movl	$0, 4(%esp)
	calll	_memset
LBB49_13:                               # %if.end25
Ltmp1126:
	movl	-8(%edi), %eax
	testl	%eax, %eax
	je	LBB49_15
# BB#14:                                # %while.body.lr.ph.i161
Ltmp1127:
	shll	$2, %eax
	movl	%eax, 8(%esp)
	movl	%edi, (%esp)
	movl	$0, 4(%esp)
	calll	_memset
LBB49_15:                               # %BitVector_Empty.exit163
Ltmp1128:
	movl	_EXP10, %eax
	movl	-36(%ebp), %ecx         # 4-byte Reload
	movl	%eax, (%ecx)
	movl	%esi, %edx
Ltmp1129:
	testl	%edx, %edx
	je	LBB49_16
# BB#17:                                # %while.body.lr.ph.lr.ph
Ltmp1130:
	addl	%edx, -20(%ebp)         # 4-byte Folded Spill
Ltmp1131:
	movl	-56(%ebp), %eax         # 4-byte Reload
	notl	%eax
	movl	%eax, -72(%ebp)         # 4-byte Spill
	movl	$0, -44(%ebp)           # 4-byte Folded Spill
LBB49_18:                               # %while.body
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB49_21 Depth 2
	xorl	%edi, %edi
	movb	$1, %al
Ltmp1132:
	movl	%eax, -40(%ebp)         # 4-byte Spill
	testl	%edx, %edx
	jne	LBB49_20
# BB#19:                                #   in Loop: Header=BB49_18 Depth=1
	xorl	%eax, %eax
	jmp	LBB49_26
	.align	16, 0x90
LBB49_20:                               # %land.rhs33.lr.ph
                                        #   in Loop: Header=BB49_18 Depth=1
	movl	%edx, %ecx
	xorl	%edi, %edi
	movl	$1, %edx
Ltmp1133:
	movl	_LOG10, %ebx
	movl	-20(%ebp), %esi         # 4-byte Reload
	.align	16, 0x90
LBB49_21:                               # %land.rhs33
                                        #   Parent Loop BB49_18 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
Ltmp1134:
	testl	%ebx, %ebx
	je	LBB49_22
# BB#23:                                # %while.body38
                                        #   in Loop: Header=BB49_21 Depth=2
	movl	%edi, -20(%ebp)         # 4-byte Spill
Ltmp1135:
	movzbl	-1(%esi), %edi
Ltmp1136:
	addl	$-48, %edi
	cmpl	$9, %edi
	movl	$11, %eax
	ja	LBB49_31
# BB#24:                                # %if.then45
                                        #   in Loop: Header=BB49_21 Depth=2
Ltmp1137:
	decl	%ebx
Ltmp1138:
	decl	%esi
	decl	%ecx
Ltmp1139:
	imull	%edx, %edi
	movl	-20(%ebp), %eax         # 4-byte Reload
	addl	%edi, %eax
	movl	%eax, %edi
Ltmp1140:
	imull	$10, %edx, %edx
Ltmp1141:
	testl	%ecx, %ecx
	jne	LBB49_21
# BB#25:                                #   in Loop: Header=BB49_18 Depth=1
	movl	%esi, -20(%ebp)         # 4-byte Spill
	xorl	%eax, %eax
	movl	-64(%ebp), %ebx         # 4-byte Reload
	jmp	LBB49_26
LBB49_22:                               #   in Loop: Header=BB49_18 Depth=1
	movl	%esi, -20(%ebp)         # 4-byte Spill
	movl	$0, -40(%ebp)           # 4-byte Folded Spill
	movl	-64(%ebp), %ebx         # 4-byte Reload
	movl	%ecx, %eax
LBB49_26:                               # %if.then49
                                        #   in Loop: Header=BB49_18 Depth=1
	movl	%eax, -52(%ebp)         # 4-byte Spill
Ltmp1142:
	movl	-44(%ebp), %eax         # 4-byte Reload
	testb	$1, %al
	je	LBB49_27
# BB#29:                                # %if.end60
                                        #   in Loop: Header=BB49_18 Depth=1
	movl	-60(%ebp), %esi         # 4-byte Reload
Ltmp1143:
	movl	%edi, (%esi)
Ltmp1144:
	movl	-24(%ebp), %eax         # 4-byte Reload
	movl	%eax, 4(%esp)
	movl	-32(%ebp), %edi         # 4-byte Reload
	movl	%edi, (%esp)
	calll	_BitVector_Copy
Ltmp1145:
	movl	%esi, 8(%esp)
	movl	%edi, 4(%esp)
	movl	%ebx, (%esp)
	movl	$0, 12(%esp)
	calll	_BitVector_Mul_Pos
	testl	%eax, %eax
	movl	-20(%ebp), %edi         # 4-byte Reload
	je	LBB49_30
	jmp	LBB49_31
	.align	16, 0x90
LBB49_27:                               # %if.else53
                                        #   in Loop: Header=BB49_18 Depth=1
	movl	-48(%ebp), %eax         # 4-byte Reload
	cmpl	%eax, -28(%ebp)         # 4-byte Folded Reload
Ltmp1146:
	movl	%edi, (%ebx)
	movl	%edi, %eax
	movl	-20(%ebp), %edi         # 4-byte Reload
	ja	LBB49_30
# BB#28:                                # %if.else53
                                        #   in Loop: Header=BB49_18 Depth=1
	andl	-72(%ebp), %eax         # 4-byte Folded Reload
	movl	$12, %eax
	jne	LBB49_45
LBB49_30:                               # %if.then62
                                        #   in Loop: Header=BB49_18 Depth=1
Ltmp1147:
	movl	$0, -16(%ebp)
	leal	-16(%ebp), %eax
Ltmp1148:
	movl	%eax, 16(%esp)
	movl	%ebx, 8(%esp)
	movl	12(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	%eax, (%esp)
	movl	$0, 12(%esp)
	calll	_BitVector_compute
Ltmp1149:
	movl	-16(%ebp), %eax
	testl	%eax, %eax
	setne	%cl
	movl	$12, %edx
	cmovnel	%edx, %eax
	movl	-40(%ebp), %edx         # 4-byte Reload
	orb	%dl, %cl
	movzbl	%cl, %ecx
	cmpl	$1, %ecx
	je	LBB49_31
# BB#34:                                # %if.then69
                                        #   in Loop: Header=BB49_18 Depth=1
	movl	%edi, -20(%ebp)         # 4-byte Spill
Ltmp1150:
	movl	-44(%ebp), %eax         # 4-byte Reload
	testb	$1, %al
	je	LBB49_35
# BB#32:                                # %while.cond.backedge
                                        #   in Loop: Header=BB49_18 Depth=1
	movl	-24(%ebp), %esi         # 4-byte Reload
Ltmp1151:
	movl	%esi, 4(%esp)
	movl	-32(%ebp), %edi         # 4-byte Reload
	movl	%edi, (%esp)
	calll	_BitVector_Copy
Ltmp1152:
	movl	-36(%ebp), %eax         # 4-byte Reload
	movl	%eax, 8(%esp)
	movl	%edi, 4(%esp)
	movl	%esi, (%esp)
	movl	$0, 12(%esp)
	calll	_BitVector_Mul_Pos
	testl	%eax, %eax
Ltmp1153:
	sete	%cl
	jne	LBB49_36
# BB#33:                                # %while.cond.backedge
                                        #   in Loop: Header=BB49_18 Depth=1
	movl	-52(%ebp), %edx         # 4-byte Reload
	testl	%edx, %edx
	jne	LBB49_18
	jmp	LBB49_36
LBB49_35:                               # %while.cond.outer.backedge
                                        #   in Loop: Header=BB49_18 Depth=1
Ltmp1154:
	movl	-36(%ebp), %eax         # 4-byte Reload
	movl	(%eax), %eax
	movl	-24(%ebp), %ecx         # 4-byte Reload
	movl	%eax, (%ecx)
	xorl	%eax, %eax
	movb	$1, %cl
	movl	%ecx, -44(%ebp)         # 4-byte Spill
	movl	-52(%ebp), %edx         # 4-byte Reload
Ltmp1155:
	testl	%edx, %edx
	movb	$1, %cl
	jne	LBB49_18
	jmp	LBB49_36
LBB49_31:                               # %while.cond.backedge.thread
	testl	%eax, %eax
	sete	%cl
	jmp	LBB49_36
LBB49_16:
	movb	$1, %cl
	xorl	%eax, %eax
LBB49_36:                               # %while.end79
Ltmp1156:
	testb	%cl, %cl
	je	LBB49_45
# BB#37:                                # %while.end79
	movl	-68(%ebp), %ecx         # 4-byte Reload
	movzbl	%cl, %ecx
	cmpl	$45, %ecx
	jne	LBB49_45
# BB#38:                                # %if.then83
	movl	12(%ebp), %edi
Ltmp1157:
	movl	-8(%edi), %ecx
	testl	%ecx, %ecx
	movl	$-1, %edx
	je	LBB49_44
# BB#39:
Ltmp1158:
	movl	-4(%edi), %edx
	movl	%edx, -24(%ebp)         # 4-byte Spill
	movl	$1, %ebx
	movl	%ecx, -20(%ebp)         # 4-byte Spill
	movl	%ecx, %esi
	.align	16, 0x90
LBB49_40:                               # %while.body.i
                                        # =>This Inner Loop Header: Depth=1
Ltmp1159:
	decl	%esi
Ltmp1160:
	movl	(%edi), %ecx
	movl	%ecx, %edx
	notl	%edx
	movl	%edx, (%edi)
	xorl	%edx, %edx
Ltmp1161:
	testl	%ebx, %ebx
	je	LBB49_42
# BB#41:                                # %if.then3.i
                                        #   in Loop: Header=BB49_40 Depth=1
Ltmp1162:
	movl	%ecx, %edx
	negl	%edx
	testl	%ecx, %ecx
	movl	%edx, (%edi)
	sete	%cl
	movzbl	%cl, %edx
LBB49_42:                               # %if.end.i
                                        #   in Loop: Header=BB49_40 Depth=1
Ltmp1163:
	addl	$4, %edi
Ltmp1164:
	testl	%esi, %esi
	movl	%edx, %ebx
	jne	LBB49_40
# BB#43:                                # %while.end.i
	movl	12(%ebp), %edi
Ltmp1165:
	movl	-20(%ebp), %ecx         # 4-byte Reload
	movl	-24(%ebp), %edx         # 4-byte Reload
	andl	%edx, -4(%edi,%ecx,4)
Ltmp1166:
	movl	-8(%edi), %edx
Ltmp1167:
	decl	%edx
LBB49_44:                               # %BitVector_Negate.exit
	movl	-56(%ebp), %esi         # 4-byte Reload
Ltmp1168:
	movl	%esi, %ecx
	shrl	%ecx
	notl	%ecx
	andl	%esi, %ecx
	testl	(%edi,%edx,4), %ecx
	movl	$12, %ecx
	cmovel	%ecx, %eax
LBB49_45:                               # %return
Ltmp1169:
	addl	$84, %esp
	popl	%esi
	popl	%edi
	popl	%ebx
	popl	%ebp
	retl
Ltmp1170:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yasm.bitvect.reduced.ii.gz
Type: application/x-gzip
Size: 34088 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140313/ae4ce346/attachment.bin>


More information about the llvm-commits mailing list