summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/xor.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-04 23:21:22 +0000
committerChris Lattner <sabre@nondot.org>2003-11-04 23:21:22 +0000
commitf61641f7d4bf69e3df7c455d6afcd9c47b4c2cbb (patch)
treebc4318aea050b0eb33d0409c437385fddaf06ecd /test/Transforms/InstCombine/xor.ll
parent4dad76cea0a85f62e016636b5b59d0bc4a7411dc (diff)
downloadllvm-f61641f7d4bf69e3df7c455d6afcd9c47b4c2cbb.tar.gz
llvm-f61641f7d4bf69e3df7c455d6afcd9c47b4c2cbb.tar.bz2
llvm-f61641f7d4bf69e3df7c455d6afcd9c47b4c2cbb.tar.xz
New testcase for masking operation that frequently occurs in the pool allocator
for converting a number that is a power of two into a mask git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/xor.ll')
-rw-r--r--test/Transforms/InstCombine/xor.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/xor.ll b/test/Transforms/InstCombine/xor.ll
index 6082e0c9a1..0e6550c233 100644
--- a/test/Transforms/InstCombine/xor.ll
+++ b/test/Transforms/InstCombine/xor.ll
@@ -98,3 +98,9 @@ bool %test14(ubyte %A, ubyte %B) {
%E = xor bool %C, %D ; E = true
ret bool %E
}
+
+uint %test15(uint %A) { ; ~(X-1) == -X
+ %B = add uint %A, 4294967295
+ %C = xor uint %B, 4294967295
+ ret uint %C
+}