[llvm] r221693 - LLVM incorrectly folds xor into select

Jonathan Roelofs jonathan at codesourcery.com
Tue Nov 11 10:07:27 PST 2014



On 11/11/14 11:00 AM, Tim Northover wrote:
>>
>> Would you mind also adding tests for what you expect these two to be lowered as:
>>
>> define i32 @t15_2(i32 %p1, i32 %p2, i32 %p3) {
>> entry:
>>   %cmp = icmp sgt i32 %p1, 8
>>   %a = select i1 %cmp, i32 %p2, i32 %p3
>>   %xor = xor i32 %a, -1
>>   ret i32 %xor
>> }
>
> Isn't this the test that was already added?
No...

%xor = xor i32 %a, -1

vs

%xor = xor i32 %a, 1

Sorry I didn't call that out more explicitly.


Cheers,

Jon
>
> Cheers.
>
> Tim.
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded



More information about the llvm-commits mailing list