<commit_before>; RUN: llc -mtriple=armv7-linux-gnueabihf %s -o - | FileCheck %s

; Check that we don't create an unpredictable STR instruction,
; e.g. str r0, [r0], #4

define i32* @earlyclobber-str-post(i32* %addr) nounwind {
; CHECK-LABEL: earlyclobber-str-post
; CHECK-NOT: str r[[REG:[0-9]+]], [r[[REG]]], #4
  %val = ptrtoint i32* %addr to i32
  store i32 %val, i32* %addr
  %new = getelementptr i32* %addr, i32 1
  ret i32* %new
}

define i16* @earlyclobber-strh-post(i16* %addr) nounwind {
; CHECK-LABEL: earlyclobber-strh-post
; CHECK-NOT: strh r[[REG:[0-9]+]], [r[[REG]]], #2
  %val = ptrtoint i16* %addr to i32
  %tr = trunc i32 %val to i16
  store i16 %tr, i16* %addr
  %new = getelementptr i16* %addr, i32 1
  ret i16* %new
}<commit_msg>[ARM] Add regression test for the earlyclobber constraint of ARM STRB.<commit_after>; RUN: llc -mtriple=armv7-linux-gnueabihf %s -o - | FileCheck %s

; Check that we don't create an unpredictable STR instruction,
; e.g. str r0, [r0], #4

define i32* @earlyclobber-str-post(i32* %addr) nounwind {
; CHECK-LABEL: earlyclobber-str-post
; CHECK-NOT: str r[[REG:[0-9]+]], [r[[REG]]], #4
  %val = ptrtoint i32* %addr to i32
  store i32 %val, i32* %addr
  %new = getelementptr i32* %addr, i32 1
  ret i32* %new
}

define i16* @earlyclobber-strh-post(i16* %addr) nounwind {
; CHECK-LABEL: earlyclobber-strh-post
; CHECK-NOT: strh r[[REG:[0-9]+]], [r[[REG]]], #2
  %val = ptrtoint i16* %addr to i32
  %tr = trunc i32 %val to i16
  store i16 %tr, i16* %addr
  %new = getelementptr i16* %addr, i32 1
  ret i16* %new
}

define i8* @earlyclobber-strb-post(i8* %addr) nounwind {
; CHECK-LABEL: earlyclobber-strb-post
; CHECK-NOT: strb r[[REG:[0-9]+]], [r[[REG]]], #1
  %val = ptrtoint i8* %addr to i32
  %tr = trunc i32 %val to i8
  store i8 %tr, i8* %addr
  %new = getelementptr i8* %addr, i32 1
  ret i8* %new
}
{'fraction_non_alphanumeric': 0.17153679653679654, 'fraction_numerical': 0.06601731601731602, 'mean_word_length': 3.9306666666666668, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2975923', 'n_tokens_mistral': 868, 'n_tokens_neox': 798, 'n_words': 232}