[Test] how to test the metadata of library function (original) (raw)

Thanks to all folks that help me, I need some help about the usage of update_cc_test_checks.py.

// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2
// RUN:  %clang -S -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefixes=CHECK

#include <math.h>

float foo (float num[], float r2inv, int n) {
   const float expm2 =  std::exp(num[10]);
   float tmp = expm2 * num[10];
   return tmp;
}

define linkonce_odr dso_local noundef float @_ZSt3expf(float noundef %__x) #1 comdat {
entry:
  %__x.addr = alloca float, align 4
  store float %__x, ptr %__x.addr, align 4
  %0 = load float, ptr %__x.addr, align 4
  %call = call float @expf(float noundef %0) #3, !tbaa !6
  ret float %call
}