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

Unified Diff: src/IceTargetLoweringX8632.cpp

Issue 550723002: Subzero: Use cvttss2si and similar instead of cvtss2si for fp->int casts. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use truncating conversion instruction for fp to int conversions Created 6 years, 3 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 | « src/IceTargetLoweringX8632.h ('k') | tests_lit/llvm2ice_tests/fp.pnacl.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX8632.cpp
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index 7b977585b5c6e910cb6bc8f2e02f4b678c518d15..6fced4d4a7db11c987a85218b2f272a8040aac74 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -2057,7 +2057,7 @@ void TargetX8632::lowerCast(const InstCast *Inst) {
Inst->getSrc(0)->getType() == IceType_v4f32);
Operand *Src0RM = legalize(Inst->getSrc(0), Legal_Reg | Legal_Mem);
Variable *T = makeReg(Dest->getType());
- _cvt(T, Src0RM);
+ _cvtt(T, Src0RM);
_movp(Dest, T);
} else if (Dest->getType() == IceType_i64) {
// Use a helper for converting floating-point values to 64-bit
@@ -2079,7 +2079,7 @@ void TargetX8632::lowerCast(const InstCast *Inst) {
// t1.i32 = cvt Src0RM; t2.dest_type = t1; Dest = t2.dest_type
Variable *T_1 = makeReg(IceType_i32);
Variable *T_2 = makeReg(Dest->getType());
- _cvt(T_1, Src0RM);
+ _cvtt(T_1, Src0RM);
_mov(T_2, T_1); // T_1 and T_2 may have different integer types
_mov(Dest, T_2);
T_2->setPreferredRegister(T_1, true);
@@ -2114,7 +2114,7 @@ void TargetX8632::lowerCast(const InstCast *Inst) {
// t1.i32 = cvt Src0RM; t2.dest_type = t1; Dest = t2.dest_type
Variable *T_1 = makeReg(IceType_i32);
Variable *T_2 = makeReg(Dest->getType());
- _cvt(T_1, Src0RM);
+ _cvtt(T_1, Src0RM);
_mov(T_2, T_1); // T_1 and T_2 may have different integer types
_mov(Dest, T_2);
T_2->setPreferredRegister(T_1, true);
« no previous file with comments | « src/IceTargetLoweringX8632.h ('k') | tests_lit/llvm2ice_tests/fp.pnacl.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698