Refactor code. Now the intrinsic lowering pass tries to recycle preexisting
authorChris Lattner <sabre@nondot.org>
Sun, 15 Feb 2004 22:16:39 +0000 (22:16 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 15 Feb 2004 22:16:39 +0000 (22:16 +0000)
commit588e72db75649e8f9f79d73c24156c9611aeacf3
tree7d35b526d606e34213739bd9aacfdb39a37749a5
parentb83530f9565b4a142671dd59d93c6ea69754bf03
Refactor code.  Now the intrinsic lowering pass tries to recycle preexisting
prototypes, even if they don't precisely match what it would prefer to use.
This fixes: CBackend/2004-02-15-PreexistingExternals.llx compiling it into:

  ltmp_0_30 = memcpy(l14_C, 4u, 17);
  ltmp_1_30 = memcpy(((int *)l27_A), ((unsigned )(long)l27_B), ((int )123u));

instead of:

  ltmp_0_30 = memcpy(l14_C, 4u, 17);
  ltmp_1_27 = l43_memcpy(l27_A, l27_B, 123u);

Which does the wrong thing as you could imagine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11481 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/IntrinsicLowering.cpp
lib/VMCore/IntrinsicLowering.cpp