1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-- -combiner-reduce-load-op-store-width=false | FileCheck %s
3
4%struct.bit_fields = type { i32 }
5
6define void @clear_b1(%struct.bit_fields* %ptr) {
7; CHECK-LABEL: clear_b1:
8; CHECK:       # %bb.0: # %entry
9; CHECK-NEXT:    andl $-2, (%rdi)
10; CHECK-NEXT:    retq
11entry:
12  %0 = bitcast %struct.bit_fields* %ptr to i32*
13  %bf.load = load i32, i32* %0
14  %bf.clear = and i32 %bf.load, -2
15  store i32 %bf.clear, i32* %0
16  ret void
17}
18
19define void @clear16(%struct.bit_fields* %ptr) {
20; CHECK-LABEL: clear16:
21; CHECK:       # %bb.0: # %entry
22; CHECK-NEXT:    andw $-2, (%rdi)
23; CHECK-NEXT:    retq
24entry:
25  %0 = bitcast %struct.bit_fields* %ptr to i16*
26  %bf.load = load i16, i16* %0
27  %bf.clear = and i16 %bf.load, -2
28  store i16 %bf.clear, i16* %0
29  ret void
30}
31