OSDN Git Service

Subzero: x8664: Fix a "uitofp i32 to double" lowering error.
authorJim Stichnoth <stichnot@chromium.org>
Tue, 13 Sep 2016 02:11:43 +0000 (19:11 -0700)
committerJim Stichnoth <stichnot@chromium.org>
Tue, 13 Sep 2016 02:11:43 +0000 (19:11 -0700)
The movzx instruction in the lowering sequence should not be allowed to be elided.

BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4379
R=jpp@chromium.org

Review URL: https://codereview.chromium.org/2335933002 .

src/IceTargetLoweringX86BaseImpl.h

index 5f1c31a..8ecef55 100644 (file)
@@ -3062,7 +3062,7 @@ void TargetX86Base<TraitsType>::lowerCast(const InstCast *Instr) {
       if (Src0RM->getType() == T_1->getType())
         _mov(T_1, Src0RM);
       else
-        _movzx(T_1, Src0RM);
+        _movzx(T_1, Src0RM)->setMustKeep();
       _cvt(T_2, T_1, Traits::Insts::Cvt::Si2ss);
       _mov(Dest, T_2);
     }