Since we're in the neighborhood, test for the inverse
authorChris Lattner <sabre@nondot.org>
Tue, 4 Nov 2003 23:49:53 +0000 (23:49 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 4 Nov 2003 23:49:53 +0000 (23:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9710 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/xor.ll

index 0cbd1320d36cc02fab58664c69d4b02afdeb0813..6516a9f0a28f0c912ef283556102ad790ab899d0 100644 (file)
@@ -110,3 +110,9 @@ uint %test16(uint %A) {             ; ~(X+c) == (-c-1)-X
        %C = xor uint %B, 4294967295
        ret uint %C
 }
+
+uint %test17(uint %A) {             ; ~(c-X) == X-(c-1) == X+(-c+1)
+       %B = sub uint 123, %A
+       %C = xor uint %B, 4294967295
+       ret uint %C
+}