[PATCH] D14304: [IR] add bounds checking to paramHasAttr

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 11:14:43 PST 2015


reames added a comment.

LGTM w/minor comment addressed given the FastISel correctness is now covered.


================
Comment at: lib/Target/X86/X86FastISel.cpp:2822
@@ +2821,3 @@
+  if (CS) {
+    if (CS->arg_size() == 0) return 0;
+    if (!CS->paramHasAttr(1, Attribute::StructRet) ||
----------------
This would be clearer as a single if within the CS one.  
if (CS->arg_empty() ||
    no struct ret ||
    inref) 
  return 0


http://reviews.llvm.org/D14304





More information about the llvm-commits mailing list