<div dir="ltr">Reverting r222040 didn't seem to help things, the bot is still failing: <a href="http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/449/consoleFull#64550831649ba4694-19c4-4d7e-bec5-911270d8a58c">http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/449/consoleFull#64550831649ba4694-19c4-4d7e-bec5-911270d8a58c</a><div><br></div><div>I'm having trouble finding a mistake in r222040.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 17, 2014 at 4:33 PM, Manman Ren <span dir="ltr"><<a href="mailto:manman.ren@gmail.com" target="_blank">manman.ren@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: mren<br>
Date: Mon Nov 17 18:33:22 2014<br>
New Revision: 222203<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=222203&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=222203&view=rev</a><br>
Log:<br>
Revert r222040 because of bot failure.<br>
<br>
<a href="http://lab.llvm.org:8080/green/job/clang-Rlto_master/298/" target="_blank">http://lab.llvm.org:8080/green/job/clang-Rlto_master/298/</a><br>
Hopefully, bot will be green.<br>
<br>
Modified:<br>
    llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp<br>
    llvm/trunk/test/Transforms/InstCombine/fpcast.ll<br>
<br>
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=222203&r1=222202&r2=222203&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=222203&r1=222202&r2=222203&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Mon Nov 17 18:33:22 2014<br>
@@ -1269,17 +1269,14 @@ Instruction *InstCombiner::visitFPTrunc(<br>
         // type of OpI doesn't enter into things at all.  We simply evaluate<br>
         // in whichever source type is larger, then convert to the<br>
         // destination type.<br>
-        Value *NewLHS = LHSOrig, *NewRHS = RHSOrig;<br>
         if (LHSWidth < SrcWidth)<br>
-          NewLHS = Builder->CreateFPExt(NewLHS, RHSOrig->getType());<br>
+          LHSOrig = Builder->CreateFPExt(LHSOrig, RHSOrig->getType());<br>
         else if (RHSWidth <= SrcWidth)<br>
-          NewRHS = Builder->CreateFPExt(NewRHS, LHSOrig->getType());<br>
-        if (NewLHS != LHSOrig || NewRHS != RHSOrig) {<br>
-          Value *ExactResult = Builder->CreateFRem(NewLHS, NewRHS);<br>
-          if (Instruction *RI = dyn_cast<Instruction>(ExactResult))<br>
-            RI->copyFastMathFlags(OpI);<br>
-          return CastInst::CreateFPCast(ExactResult, CI.getType());<br>
-        }<br>
+          RHSOrig = Builder->CreateFPExt(RHSOrig, LHSOrig->getType());<br>
+        Value *ExactResult = Builder->CreateFRem(LHSOrig, RHSOrig);<br>
+        if (Instruction *RI = dyn_cast<Instruction>(ExactResult))<br>
+          RI->copyFastMathFlags(OpI);<br>
+        return CastInst::CreateFPCast(ExactResult, CI.getType());<br>
     }<br>
<br>
     // (fptrunc (fneg x)) -> (fneg (fptrunc x))<br>
<br>
Modified: llvm/trunk/test/Transforms/InstCombine/fpcast.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/fpcast.ll?rev=222203&r1=222202&r2=222203&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/fpcast.ll?rev=222203&r1=222202&r2=222203&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/Transforms/InstCombine/fpcast.ll (original)<br>
+++ llvm/trunk/test/Transforms/InstCombine/fpcast.ll Mon Nov 17 18:33:22 2014<br>
@@ -53,13 +53,3 @@ define half @test5(float %a, float %b, f<br>
 }<br>
<br>
 declare float @llvm.fabs.f32(float) nounwind readonly<br>
-<br>
-define <1 x float> @test6(<1 x double> %V) {<br>
-  %frem = frem <1 x double> %V, %V<br>
-  %trunc = fptrunc <1 x double> %frem to <1 x float><br>
-  ret <1 x float> %trunc<br>
-; CHECK-LABEL: @test6<br>
-; CHECK-NEXT: %[[frem:.*]]  = frem <1 x double> %V, %V<br>
-; CHECK-NEXT: %[[trunc:.*]] = fptrunc <1 x double> %[[frem]] to <1 x float><br>
-; CHECK-NEXT: ret <1 x float> %trunc<br>
-}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>