1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-- -x86-promote-anyext-load=false | FileCheck %s 3 4%struct.S = type { i32, i16, i16 } 5 6define void @foo(ptr %p, i16 signext %s) { 7; CHECK-LABEL: foo: 8; CHECK: # %bb.0: # %entry 9; CHECK-NEXT: movzwl 4(%rdi), %eax 10; CHECK-NEXT: andl $-1121, %eax # imm = 0xFB9F 11; CHECK-NEXT: orl $1024, %eax # imm = 0x400 12; CHECK-NEXT: movw %ax, 4(%rdi) 13; CHECK-NEXT: retq 14entry: 15 %f2 = getelementptr inbounds %struct.S, ptr %p, i64 0, i32 1 16 %0 = load i16, ptr %f2, align 4 17 %1 = and i16 %0, -1121 18 %2 = or i16 %1, 1024 19 store i16 %2, ptr %f2, align 4 20 ret void 21} 22 23