forked from OSchip/llvm-project
Fix test/Regression/Assembler/2006-12-09-Cast-To-Bool.ll
Do not upgrade casts of bool to bool. llvm-svn: 32404
This commit is contained in:
parent
2fee8a99e2
commit
2126b0518e
|
@ -188,7 +188,7 @@ static std::string getCastUpgrade(
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue