[llvm-commits] [llvm] r123034 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineSelect.cpp test/Transforms/InstCombine/select.ll

Cameron Zwarich zwarich at apple.com
Sun Jan 9 00:46:23 PST 2011


On Jan 9, 2011, at 12:04 AM, Tobias Grosser wrote:

> On 01/09/2011 01:46 AM, Cameron Zwarich wrote:
>> On Jan 8, 2011, at 7:21 AM, Tobias Grosser wrote:
>> 
>>> On 01/08/2011 05:56 AM, Frits van Bommel wrote:
>>>> On Sat, Jan 8, 2011 at 2:44 AM, Benjamin Kramer
>>>> <benny.kra at googlemail.com>   wrote:
>>>>> On 07.01.2011, at 22:33, Tobias Grosser wrote:
>>>>>> +          Constant *sextRHS = ConstantExpr::getSExt(AdjustedRHS,
>>>>>> +                                                    SI.getType());
>>>>> 
>>>>> This line (ConstantExpr::getSExt) hits an assertion failure in some files in the test suite
>>>> 
>>>>> And the offending IR is:
>>>>>  %175 = sitofp i32 %j.3 to double
>>>>>  %174 = icmp slt i32 %j.3, 2
>>>>>  %176 = select i1 %174, double 2.000000e+00, double %175
>>>> 
>>>> Fixed in r123061.
>>> Hey Frits,
>>> 
>>> thanks a lot.
>> 
>> Even with r123061, I still see the following on one of my tests against SPEC. I guess I should make a reduction for you guys.
> 
> I believe the attached patch should fix the issue. Could you give it a try?
> 
> I am not 100% sure, if this is the right approach so a review before committing this would be appreciated.

It does fix the problem, but I don't know enough about this code to review it. You probably don't want this, though:

@@ -1,5 +1,3 @@
-//===- InstCombineSelect.cpp ----------------------------------------------===//
-//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source

Cameron



More information about the llvm-commits mailing list