This is missed by InstCombine, patch comming
authorAndrew Lenharth <andrewl@lenharth.org>
Wed, 2 Nov 2005 18:34:05 +0000 (18:34 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Wed, 2 Nov 2005 18:34:05 +0000 (18:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24157 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/add.ll

index 8a84863c2e1d0179116aaa62f4d1612a6f165792..3de3f33310214d9792ff6d80f8ee6b3b74a0f448 100644 (file)
@@ -206,3 +206,10 @@ uint %test29(uint %X, uint %x) {
         %tmp.10 = or uint %tmp.7, %tmp.9                ; <uint> [#uses=1]
        ret uint %tmp.10
 }
+
+long %test30(long %x) {
+        %tmp.2 = xor long %x, -9223372036854775808
+        ;; Add of sign bit -> xor of sign bit.
+        %tmp.4 = add long %tmp.2, -9223372036854775808
+        ret long %tmp.4
+}