diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-07-07 21:13:10 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-07-07 21:13:10 +0000 |
commit | 14ef3191a75b8bcdab391e6ffa6367b731c2ce67 (patch) | |
tree | f5d94a2f172f8ded91c93c925c11f65626bca6c3 /lib/Basic/SourceManager.cpp | |
parent | dbd3c85825ad59896292ac7d326fe1985768f1e3 (diff) |
Layout the code for trapping arithmetic so that the overflow case comes after
the normal case.
Before, for this:
$ cat t.c
int test(int x) { return x * 2; }
We would get this:
addl %edi, %edi
jno LBB0_2
## BB#1: ## %overflow
ud2
LBB0_2: ## %nooverflow
movl %edi, %eax
popq %rbp
ret
Now we get this:
addl %edi, %edi
jo LBB0_2
## BB#1: ## %nooverflow
movl %edi, %eax
popq %rbp
ret
LBB0_2: ## %overflow
ud2
<rdar://problem/8283919>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions