diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-08-15 14:09:56 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-08-15 14:09:56 +0000 |
commit | 0f63e22e843e750ab89617824183d2821563f5e7 (patch) | |
tree | 04b2d75204f30b4878e0c50b27b5cd059f107e8a /test/CodeGen/Generic | |
parent | 5cf6f112e67e7d6897ed350d5e029868d0af33bf (diff) | |
download | external_llvm-0f63e22e843e750ab89617824183d2821563f5e7.zip external_llvm-0f63e22e843e750ab89617824183d2821563f5e7.tar.gz external_llvm-0f63e22e843e750ab89617824183d2821563f5e7.tar.bz2 |
Add tests for unary NOT operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3340 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic')
-rw-r--r-- | test/CodeGen/Generic/select.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/select.ll b/test/CodeGen/Generic/select.ll index ed2e833..5976e5f 100644 --- a/test/CodeGen/Generic/select.ll +++ b/test/CodeGen/Generic/select.ll @@ -149,3 +149,21 @@ bb2: ;;<label> %reg160 = add long 7654321, %cast117 ;; and here. ret int 0 end + + +; Test case for unary NOT operation constructed from XOR. +; +void "checkNot"(bool %b, int %i) +begin + %notB = xor bool %b, true + %notI = xor int %i, -1 + %F = setge int %notI, 100 + %J = add int %i, %i + %andNotB = and bool %F, %notB ;; should get folded with notB + %andNotI = and int %J, %notI ;; should get folded with notI + + %notB2 = xor bool true, %b ;; should become XNOR + %notI2 = xor int -1, %i ;; should become XNOR + + ret void +end |