llvm.org GIT mirror llvm / fc3b6f3
--- Merging r127464 into '.': U test/Transforms/InstCombine/select.ll U lib/Transforms/InstCombine/InstCombineSelect.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_29@127609 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 8 years ago
2 changed file(s) with 12 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
502502 if (!IC || !IC->isEquality())
503503 return 0;
504504
505 if (ConstantInt *C = dyn_cast(IC->getOperand(1)))
506 if (!C->isZero())
507 return 0;
505 if (!match(IC->getOperand(1), m_Zero()))
506 return 0;
508507
509508 ConstantInt *AndRHS;
510509 Value *LHS = IC->getOperand(0);
713713 ret i32 %storemerge
714714 }
715715
716 ; PR9454
717 define i32 @test53(i32 %x) nounwind {
718 %and = and i32 %x, 2
719 %cmp = icmp eq i32 %and, %x
720 %sel = select i1 %cmp, i32 2, i32 1
721 ret i32 %sel
722 ; CHECK: @test53
723 ; CHECK: select i1 %cmp
724 ; CHECK: ret
725 }