29 lines · plain
1; RUN: llc < %s -mtriple=i686-- | FileCheck %s2 3;; This example can't fold the or into an LEA.4define i32 @test(ptr %tmp2, i32 %tmp12) nounwind {5; CHECK-LABEL: test:6; CHECK-NOT: ret7; CHECK: orl $1, %{{.*}}8; CHECK: ret9 10 %tmp3 = load ptr, ptr %tmp211 %tmp132 = shl i32 %tmp12, 2 ; <i32> [#uses=1]12 %ctg2 = getelementptr i8, ptr %tmp3, i32 %tmp132 ; <ptr> [#uses=1]13 %tmp6 = ptrtoint ptr %ctg2 to i32 ; <i32> [#uses=1]14 %tmp14 = or i32 %tmp6, 1 ; <i32> [#uses=1]15 ret i32 %tmp1416}17 18;; This can!19define i32 @test2(i32 %a, i32 %b) nounwind {20; CHECK-LABEL: test2:21; CHECK-NOT: ret22; CHECK: leal 3(,%{{.*}},8)23; CHECK: ret24 25 %c = shl i32 %a, 326 %d = or i32 %c, 327 ret i32 %d28}29