llvm.org GIT mirror llvm / a917400
Docs: fix sign of division and increase equivocation on code generated. I should have been a politician. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199092 91177308-0d34-0410-b5e6-96231b3b80d8 Tim Northover 6 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
433433 .. code-block:: llvm
434434
435435 define i32 @test(i32 %X, i32 %Y) {
436 %Z = udiv i32 %X, %Y
436 %Z = sdiv i32 %X, %Y
437437 ret i32 %Z
438438 }
439439
440 The X86 instruction selector produces this machine code for the ``div`` and
441 ``ret`` (use "``llc X.bc -march=x86 -print-machineinstrs``" to get this):
440 The X86 instruction selector might produce this machine code for the ``div`` and
441 ``ret``:
442442
443443 .. code-block:: llvm
444444
453453 %EAX = mov %reg1026 ;; 32-bit return value goes in EAX
454454 ret
455455
456 By the end of code generation, the register allocator has coalesced the
457 registers and deleted the resultant identity moves producing the following
456 By the end of code generation, the register allocator would coalesce the
457 registers and delete the resultant identity moves producing the following
458458 code:
459459
460460 .. code-block:: llvm