Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Unified Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 1394413002: Subzero: Don't "and" i1 values with 1. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/64bit.pnacl.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index 16f2b2fc3e62e24f6ff683b6bfc8bbf389b670d9..0b3a32f87c0b0c283d946e971b4f73fc0ebca0cc 100644
--- a/src/IceTargetLoweringX86BaseImpl.h
+++ b/src/IceTargetLoweringX86BaseImpl.h
@@ -2047,15 +2047,10 @@ void TargetX86Base<Machine>::lowerCast(const InstCast *Inst) {
} else {
_movzx(Tmp, Src0RM);
}
- if (Src0RM->getType() == IceType_i1) {
John 2015/10/09 12:14:08 are you 100% sure this is OK? I've wondered about
Jim Stichnoth 2015/10/09 13:50:22 I'm about 99.44% sure... The idea is to look thro
- Constant *One = Ctx->getConstantInt32(1);
- _and(Tmp, One);
- }
_mov(DestLo, Tmp);
_mov(DestHi, Zero);
} else if (Src0RM->getType() == IceType_i1) {
- // t = Src0RM; t &= 1; Dest = t
- Constant *One = Ctx->getConstantInt32(1);
+ // t = Src0RM; Dest = t
Type DestTy = Dest->getType();
Variable *T = nullptr;
if (DestTy == IceType_i8) {
@@ -2069,7 +2064,6 @@ void TargetX86Base<Machine>::lowerCast(const InstCast *Inst) {
T = makeReg(DestTy == IceType_i64 ? IceType_i64 : IceType_i32);
_movzx(T, Src0RM);
}
- _and(T, One);
_mov(Dest, T);
} else {
// t1 = movzx src; dst = t1
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/64bit.pnacl.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698