[PATCH] D41369: [PowerPC] Fix for PR35688 - handle out-of-range values for r+r to r+i conversion

Benjamin Kramer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 05:07:24 PST 2017


bkramer added inline comments.


================
Comment at: lib/Target/PowerPC/PPCInstrInfo.cpp:2912
+  if (III.TruncateImmTo)
+    Imm &= ((1 << III.TruncateImmTo) - 1);
   if (III.SignedImm) {
----------------
Is this correct? This would turn

  li c, 65
  srad x, x, c
into
  sradi x, x, 1

My PPC asm is a bit rusty, but those two things don't look
like they do the same thing.


Repository:
  rL LLVM

https://reviews.llvm.org/D41369





More information about the llvm-commits mailing list