brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 0309fa7 Raw
33 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-darwin | FileCheck %s3;4; Test the add and load are folded into the store instruction.5 6@X = internal global i16 0              ; <ptr> [#uses=2]7 8define void @foo() nounwind {9; CHECK-LABEL: foo:10; CHECK:       ## %bb.0:11; CHECK-NEXT:    addw $329, _X ## imm = 0x14912; CHECK-NEXT:    retl13  %tmp.0 = load i16, ptr @X           ; <i16> [#uses=1]14  %tmp.3 = add i16 %tmp.0, 329            ; <i16> [#uses=1]15  store i16 %tmp.3, ptr @X16  ret void17}18 19; rdar://1283850420%struct.S2 = type { i64, i16, [2 x i8], i8, [3 x i8], [7 x i8], i8, [8 x i8] }21@s2 = external global %struct.S2, align 1622define void @test2() nounwind uwtable ssp {23; CHECK-LABEL: test2:24; CHECK:       ## %bb.0:25; CHECK-NEXT:    movl L_s2$non_lazy_ptr, %eax26; CHECK-NEXT:    andl $-67108609, 19(%eax) ## imm = 0xFC0000FF27; CHECK-NEXT:    retl28  %bf.load35 = load i56, ptr getelementptr inbounds (%struct.S2, ptr @s2, i32 0, i32 5), align 1629  %bf.clear36 = and i56 %bf.load35, -112589561187532930  store i56 %bf.clear36, ptr getelementptr inbounds (%struct.S2, ptr @s2, i32 0, i32 5), align 1631  ret void32}33