[PATCH] [ARM] Add earlyclobber constraint to pre/post-indexed ARM STR instructions.

Tim Northover t.p.northover at gmail.com
Fri Jul 18 04:48:55 PDT 2014


Hi Tilmann,

On 18 July 2014 12:22, Tilmann Scheller <t.scheller at samsung.com> wrote:
> I expect that there are some more ARM load/store instructions which lack the earlyclobber constraint, I plan to go through all of them and submit additional patches accordingly.

Excellent. The code looks fine here, but you should be able to
simplify the test slightly to avoid the control-flow & loops:

define i32* @foo(i32* %addr) {
  %val = ptrtoint i32* %addr to i32
  store i32 %val, i32* %addr
  %new = getelementptr i32* %addr, i32 1
  ret i32* %new
}

You should probably just go ahead and commit any similar fixes you do.
They're pretty obviously correct.

Cheers.

Tim.



More information about the llvm-commits mailing list