[PATCH] D30422: Keep attributes, calling convention, etc, when remangling intrinsic

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 15:18:51 PST 2017


sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.

lgtm with two minor comments inline.



================
Comment at: lib/IR/AutoUpgrade.cpp:1955
+    NewCall = Builder.CreateCall(
+        NewFn, {CI->getArgOperand(0), Builder.getFalse()}, Name);
+    break;
----------------
We're doing redundant work here -- I don't think we need to pass in `Name` to `CreateCall`, since we're going to set the name explicitly anyway.

Once we've removed these uses of `Name`, we should be able to sink the `std::string Name = CI->getName();` to after the switch.


================
Comment at: test/CodeGen/Generic/overloaded-intrinsic-name.ll:2
 ; RUN: opt -verify -S < %s
+; RUN: opt -S < %s | FileCheck %s
 
----------------
Do we really need a new `RUN` line here?  Why not just tack on a `| FileCheck %s` to the already existing line?


https://reviews.llvm.org/D30422





More information about the llvm-commits mailing list