diff options
author | Sam Parker <sam.parker@arm.com> | 2018-11-01 15:23:42 +0000 |
---|---|---|
committer | Sam Parker <sam.parker@arm.com> | 2018-11-01 15:23:42 +0000 |
commit | 84a2f8b364eda5359f108915c2a2967f368e934a (patch) | |
tree | 22a71065b46253808f36bbd04e4368ad7d43ec49 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | f1005012c26809b81374df80bd67deaaf9bd04a5 (diff) | |
download | llvm-84a2f8b364eda5359f108915c2a2967f368e934a.zip llvm-84a2f8b364eda5359f108915c2a2967f368e934a.tar.gz llvm-84a2f8b364eda5359f108915c2a2967f368e934a.tar.bz2 |
[ARM][CGP] Negative constant operand handling
While mutating instructions, we sign extended negative constant
operands for binary operators that can safely overflow. This was to
allow instructions, such as add nuw i8 %a, -2, to still be able to
perform a subtraction. However, the code to handle constants doesn't
take into consideration that instructions, such as sub nuw i8 -2, %a,
require the i8 -2 to be converted into i32 254.
This is a relatively simple fix, but I've taken the time to
reorganise the code a bit - mainly that instructions that can be
promoted are cached and splitting up the Mutate function.
Differential Revision: https://reviews.llvm.org/D53972
llvm-svn: 345840
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions