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 | e367f387af5fbc04bace55024d857925d4141c98 (patch) | |
tree | 1de20264b9a8b30a09152a6a201f793fc9131384 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 13bcc6c1c7f35df1d185737ec516f43caf32c3d9 (diff) | |
download | llvm-e367f387af5fbc04bace55024d857925d4141c98.zip llvm-e367f387af5fbc04bace55024d857925d4141c98.tar.gz llvm-e367f387af5fbc04bace55024d857925d4141c98.tar.bz2 |
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>
llvm-svn: 134642
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions