Precommit tests for D140666.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'm not sure if you should add negative tests for
(~B & C) == 0 && (~D & E) == 0,
But we may need some more negative tests. At least one more for
!ConstB->isSubsetOf(*ConstD) && !ConstD->isSubsetOf(*ConstB)
It's better you can try more different constants in the different tests.
And we need at least 1 vector test.
Comment Actions
But we may need some more negative tests. At least one more for
Add:
define i1 @masked_not_subset_notoptimized(i32 %A) { ; CHECK-LABEL: @masked_not_subset_notoptimized( ; CHECK-NEXT: [[MASK1:%.*]] = and i32 [[A:%.*]], 254 ; CHECK-NEXT: [[TST1:%.*]] = icmp ne i32 [[MASK1]], 252 ; CHECK-NEXT: [[MASK2:%.*]] = and i32 [[A]], 253 ; CHECK-NEXT: [[TST2:%.*]] = icmp ne i32 [[MASK2]], 252 ; CHECK-NEXT: [[RES:%.*]] = and i1 [[TST1]], [[TST2]] ; CHECK-NEXT: ret i1 [[RES]] ; %mask1 = and i32 %A, 254 ; 0xfe %tst1 = icmp ne i32 %mask1, 252 ; 0xfc %mask2 = and i32 %A, 253 ; 0xfd %tst2 = icmp ne i32 %mask2, 252 ; 0xfc %res = and i1 %tst1, %tst2 ret i1 %res }
And we need at least 1 vector test.
I may not understand what you mean :(. We are doing an optimization on scalar right now?
Comment Actions
Take a look @masked_and_notallzeroes_splat in this file.
And it's better to add a test that replace one of the value to poison for splat constant also.
Another example in recent patch D142783:
@dec_zext_add_nonzero_vec , @dec_zext_add_nonzero_vec_poison1