[Patch] [AArch64] Fix registerAllocator assigns same register for base and wback in pre/post-index load and store

Tim Northover t.p.northover at gmail.com
Mon Aug 11 03:10:04 PDT 2014


> Since this behavior will depend on the register allocator so I am not sure how to produce a test.

You need regalloc bait. Something tasty and irresistible to a healthy
register allocator: potential pressure savings!

Something like this should do the trick:

define i64* @foo(i64* %addr) {
  %paddr = bitcast i64* %addr to i64**
  store i64* %addr, i64** %paddr

  %newaddr = getelementptr i64* %addr, i32 1
  ret i64* %newaddr
}

Cheers.

Tim.



More information about the llvm-commits mailing list