[PATCH] D51032: [ARM] Avoid injecting constant islands in movw+movt pairs on Windows

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 06:18:00 PDT 2018


peter.smith added a comment.

The code changes look good to me, although someone more familiar with the ConstantIslands pass may have a better idea of how to prevent splitting. The only other thought about the test is to make a MIR test and just run the constant-islands pass. For example see the test constant-islands-cfg.mir. I suspect that it will be hard to write the test but it should be a lot less fragile.



================
Comment at: test/CodeGen/ARM/constant-island-movwt.ll:303
+attributes #0 = { nounwind "target-cpu"="cortex-a9" "target-features"="+dsp,+fp16,+neon,+strict-align,+thumb-mode,+vfp3" }
+
+; CHECK:              movw    r5, :lower16:.L.str.118
----------------
If it isn't possible to test this any other way, I suggest adding a comment describing what the test is looking for as it isn't obvious without reference to this review. It may also be possible to loosen some of the conditions such as specific register numbers and presence of other instructions like vdup that might cause a spurious failure if there are small changes.


Repository:
  rL LLVM

https://reviews.llvm.org/D51032





More information about the llvm-commits mailing list