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
4 %struct.S = type { i32, i16, i16 }
6 define void @foo(ptr %p, i16 signext %s) {
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)
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
19 store i16 %2, ptr %f2, align 4