Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Library vectorization broken with new pass manager #43740

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR44770
Status NEW
Importance P normal
Reported by Benjamin Kramer (benny.kra@gmail.com)
Reported on 2020-02-04 06:37:05 -0800
Last modified on 2020-02-28 11:11:21 -0800
Version trunk
Hardware PC Linux
CC francesco.petrogalli@arm.com, jdoerfert@anl.gov, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
$ cat veclib.c
void foo(float *a) {
  for (int i = 0; i != 1024; ++i)
    a[i] = __builtin_expf(a[i]);
}

$ clang -O3 -S -o - veclib.c -fveclib=Accelerate -fexperimental-new-pass-
manager|grep vexpf
$ clang -O3 -S -o - veclib.c -fveclib=Accelerate |grep vexpf
        callq   vexpf
        callq   vexpf

The reason seems to be that InjectTLIMappings never runs.
Quuxplusone commented 4 years ago

Fixed by https://reviews.llvm.org/D75354

Thank you Masoud [1] for taking care of this.

Francesco

[1] https://reviews.llvm.org/p/masoud.ataei/