llvm.org GIT mirror llvm / 0f63e22
Add tests for unary NOT operations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3340 91177308-0d34-0410-b5e6-96231b3b80d8 Vikram S. Adve 18 years ago
2 changed file(s) with 36 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
148148 %reg160 = add long 7654321, %cast117 ;; and here.
149149 ret int 0
150150 end
151
152
153 ; Test case for unary NOT operation constructed from XOR.
154 ;
155 void "checkNot"(bool %b, int %i)
156 begin
157 %notB = xor bool %b, true
158 %notI = xor int %i, -1
159 %F = setge int %notI, 100
160 %J = add int %i, %i
161 %andNotB = and bool %F, %notB ;; should get folded with notB
162 %andNotI = and int %J, %notI ;; should get folded with notI
163
164 %notB2 = xor bool true, %b ;; should become XNOR
165 %notI2 = xor int -1, %i ;; should become XNOR
166
167 ret void
168 end
148148 %reg160 = add long 7654321, %cast117 ;; and here.
149149 ret int 0
150150 end
151
152
153 ; Test case for unary NOT operation constructed from XOR.
154 ;
155 void "checkNot"(bool %b, int %i)
156 begin
157 %notB = xor bool %b, true
158 %notI = xor int %i, -1
159 %F = setge int %notI, 100
160 %J = add int %i, %i
161 %andNotB = and bool %F, %notB ;; should get folded with notB
162 %andNotI = and int %J, %notI ;; should get folded with notI
163
164 %notB2 = xor bool true, %b ;; should become XNOR
165 %notI2 = xor int -1, %i ;; should become XNOR
166
167 ret void
168 end