From f61641f7d4bf69e3df7c455d6afcd9c47b4c2cbb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 4 Nov 2003 23:21:22 +0000 Subject: [PATCH] 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 --- test/Transforms/InstCombine/xor.ll | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/Transforms/InstCombine/xor.ll b/test/Transforms/InstCombine/xor.ll index 6082e0c9a1b..0e6550c2333 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 +} -- 2.34.1