Displaying 1 result from an estimated 1 matches for "test_extract_subreg_func".
2015 Sep 30
2
InstCombine wrongful (?) optimization on BinOp with SameOperands
Hi all,
I have been looking at the way LLVM optimizes code before
forwarding it to the backend I develop for my company and while building
define i32 @test_extract_subreg_func(i32 %x, i32 %y) #0 {
entry:
%conv = zext i32 %x to i64
%conv1 = zext i32 %y to i64
%mul = mul nuw i64 %conv1, %conv
%shr = lshr i64 %mul, 32
%xor = xor i64 %shr, %mul
%conv2 = trunc i64 %xor to i32
ret i32 %conv2
}
I came upon the following optimization (during instcombine):
*...