mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-31 07:43:37 +00:00
Fix test/Regression/Assembler/2006-12-09-Cast-To-Bool.ll
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
This commit is contained in:
parent
ed819df5ef
commit
7969681c8b
@ -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…
x
Reference in New Issue
Block a user