brintos

brintos / llvm-project-archived public Read only

0
0
Text · 700 B · 693e807 Raw
35 lines · plain
1; RUN: opt < %s -passes=instcombine -S | FileCheck %s2 3define i41 @test0(i41 %A, i41 %B, i41 %C) {4	%X = shl i41 %A, %C5	%Y = shl i41 %B, %C6	%Z = and i41 %X, %Y7	ret i41 %Z8; CHECK-LABEL: @test0(9; CHECK-NEXT: and i41 %A, %B10; CHECK-NEXT: shl i4111; CHECK-NEXT: ret12}13 14define i57 @test1(i57 %A, i57 %B, i57 %C) {15	%X = lshr i57 %A, %C16	%Y = lshr i57 %B, %C17	%Z = or i57 %X, %Y18	ret i57 %Z19; CHECK-LABEL: @test1(20; CHECK-NEXT: or i57 %A, %B21; CHECK-NEXT: lshr i5722; CHECK-NEXT: ret23}24 25define i49 @test2(i49 %A, i49 %B, i49 %C) {26	%X = ashr i49 %A, %C27	%Y = ashr i49 %B, %C28	%Z = xor i49 %X, %Y29	ret i49 %Z30; CHECK-LABEL: @test2(31; CHECK-NEXT: xor i49 %A, %B32; CHECK-NEXT: ashr i4933; CHECK-NEXT: ret34}35