diff options
author | Tim Northover <tnorthover@apple.com> | 2014-01-13 10:47:04 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-01-13 10:47:04 +0000 |
commit | a9174005842395c43cc75a310933c365a3df1d85 (patch) | |
tree | ac0a51f011bb7ead06c24cdd83cfbe8b3027b2c7 /docs/CodeGenerator.rst | |
parent | 54d3aa15376e74ed9e16b376dfd8bd63520a002d (diff) | |
download | llvm-a9174005842395c43cc75a310933c365a3df1d85.tar.gz llvm-a9174005842395c43cc75a310933c365a3df1d85.tar.bz2 llvm-a9174005842395c43cc75a310933c365a3df1d85.tar.xz |
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
Diffstat (limited to 'docs/CodeGenerator.rst')
-rw-r--r-- | docs/CodeGenerator.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/CodeGenerator.rst b/docs/CodeGenerator.rst index c87a628672..b89d2f426f 100644 --- a/docs/CodeGenerator.rst +++ b/docs/CodeGenerator.rst @@ -434,12 +434,12 @@ For example, consider this simple LLVM example: .. code-block:: llvm define i32 @test(i32 %X, i32 %Y) { - %Z = udiv i32 %X, %Y + %Z = sdiv i32 %X, %Y ret i32 %Z } -The X86 instruction selector produces this machine code for the ``div`` and -``ret`` (use "``llc X.bc -march=x86 -print-machineinstrs``" to get this): +The X86 instruction selector might produce this machine code for the ``div`` and +``ret``: .. code-block:: llvm @@ -454,8 +454,8 @@ The X86 instruction selector produces this machine code for the ``div`` and %EAX = mov %reg1026 ;; 32-bit return value goes in EAX ret -By the end of code generation, the register allocator has coalesced the -registers and deleted the resultant identity moves producing the following +By the end of code generation, the register allocator would coalesce the +registers and delete the resultant identity moves producing the following code: .. code-block:: llvm |