diff options
author | John Criswell <criswell@uiuc.edu> | 2005-07-14 19:56:03 +0000 |
---|---|---|
committer | John Criswell <criswell@uiuc.edu> | 2005-07-14 19:56:03 +0000 |
commit | 8bf0f649234fe47e4755bfd816a9877a9e86f3b5 (patch) | |
tree | 9f5cd7194ce56600abe7bab08935692a39b3eca5 | |
parent | ce4e1e419e89c89f98699f74a453412a328d1cfb (diff) |
Regression test for PR#596: Make sure that negation of a minus doesn't
turn into a C predecrement operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22438 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll b/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll new file mode 100644 index 0000000000..9880456dbe --- /dev/null +++ b/test/CodeGen/CBackend/2005-07-14-NegationToMinusMinus.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | llc -march=c | not grep "\-\-65535" +; ModuleID = '<stdin>' +target endian = little +target pointersize = 32 +target triple = "i686-pc-linux-gnu" + +implementation ; Functions: + +declare void %func(int) + +void %funcb() { +entry: + %tmp.1 = sub int 0, -65535 ; <int> [#uses=1] + call void %func( int %tmp.1 ) + br label %return + +return: ; preds = %entry + ret void +} |