[PATCH] D54115: [InstCombine] do not shrink switch conditions to illegal types (PR29009)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 5 10:30:24 PST 2018


lebedev.ri added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:2485-2486
   // Shrink the condition operand if the new type is smaller than the old type.
   // This may produce a non-standard type for the switch, but that's ok because
   // the backend should extend back to a legal type for the target.
+  if (NewWidth > 0 && NewWidth < Known.getBitWidth() &&
----------------
The comments here and in the beginning of the test file say the same thing.
I remember there were a few mails about this on the mailing list.
Were you able to come to an conclusion that this is *certainly* not a backend problem?


Repository:
  rL LLVM

https://reviews.llvm.org/D54115





More information about the llvm-commits mailing list