[PATCH] D18656: [SimplifyLibCalls] Strip dead code in printf() transformations

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 3 21:03:25 PDT 2016


filcab added a subscriber: filcab.

================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1837
@@ -1836,3 +1836,1 @@
     Value *Res = emitPutChar(B.getInt32(FormatStr[0]), B, TLI);
-    if (CI->use_empty() || !Res)
-      return Res;
----------------
What about the `!Res` case? If the target has `printf`, but not `putchar`, for some reason? Or do we simply not care about those (which I think is valid :) )?



Repository:
  rL LLVM

http://reviews.llvm.org/D18656





More information about the llvm-commits mailing list