1 ; This test makes sure that add instructions are properly eliminated.
2 ; This test is for Integer BitWidth <= 64 && BitWidth % 8 != 0.
4 ; RUN: opt < %s -instcombine -S | \
5 ; RUN: grep -v OK | not grep add
8 define i1 @test1(i1 %x) {
10 ;; Add of sign bit -> xor of sign bit.
11 %tmp.4 = add i1 %tmp.2, 1
15 define i47 @test2(i47 %x) {
16 %tmp.2 = xor i47 %x, 70368744177664
17 ;; Add of sign bit -> xor of sign bit.
18 %tmp.4 = add i47 %tmp.2, 70368744177664
22 define i15 @test3(i15 %x) {
23 %tmp.2 = xor i15 %x, 16384
24 ;; Add of sign bit -> xor of sign bit.
25 %tmp.4 = add i15 %tmp.2, 16384
29 define i49 @test6(i49 %x) {
30 ;; (x & 254)+1 -> (x & 254)|1
31 %tmp.2 = and i49 %x, 562949953421310
32 %tmp.4 = add i49 %tmp.2, 1