mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 14:28:54 -04:00

The motivation for the change is that we can't have pseudo-global settings for codegen living in TargetOptions because that doesn't work with LTO. Ideally, these reciprocal attributes will be moved to the instruction-level via FMF, metadata, or something else. But making them function attributes is at least an improvement over the current state. I'm committing this patch ahead of the related LLVM patch to avoid bot failures, but if that patch needs to be reverted, then this should be reverted too. Differential Revision: https://reviews.llvm.org/D24815 llvm-svn: 283251
8 lines
198 B
C
8 lines
198 B
C
// RUN: %clang_cc1 -mrecip=!sqrtf,vec-divf:3 -emit-llvm %s -o - | FileCheck %s
|
|
|
|
int baz(int a) { return 4; }
|
|
|
|
// CHECK: baz{{.*}} #0
|
|
// CHECK: #0 = {{.*}}"reciprocal-estimates"="!sqrtf,vec-divf:3"
|
|
|