[PATCH] D10662: [x86] fix allowsMisalignedMemoryAccess() implementation

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 08:39:37 PDT 2015


spatel added inline comments.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:1910
@@ +1909,3 @@
+    else
+      *Fast = Subtarget->isUnalignedMemAccessFast();
+  }
----------------
jyknight wrote:
> This (pre-existing code!) seems really wrong. "isUnalignedMemAccessFast" is a very-poorly-named predicate, which only really is intended to indicate whether unaligned SSE 16-byte memory accesses are fast.
> 
> I believe unaligned access of all other sizes should always be treated as fast on x86. Does it break anything if you fix that too while you're in here?
> 
I agree that the name is wrong; I added that FIXME note in x86.td. :)
And yes, the logic here looks quite wrong to me. I'm working on a possibly related bug in PR24449. If it's alright with you, I'd like to get this patch in since it's a small independent fix. Then, I'll make sure the 16-byte and under checks are working as intended and put a patch up for review for that.



http://reviews.llvm.org/D10662





More information about the llvm-commits mailing list