Do not upgrade casts of bool to bool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32404
91177308-0d34-0410-b5e6-
96231b3b80d8
SrcTy.destroy();
SrcTy.newTy = new std::string("ulong");
SrcTy.oldTy = ULongTy;
- } else if (DstTy.oldTy == BoolTy) {
+ } else if (DstTy.oldTy == BoolTy && SrcTy.oldTy != BoolTy) {
// cast ptr %x to bool was previously defined as setne ptr %x, null
// The ptrtoint semantic is to truncate, not compare so we must retain
// the original intent by replace the cast with a setne