diff options
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 3 | ||||
| -rw-r--r-- | clang/test/CodeGenOpenCL/fpmath.cl (renamed from clang/test/CodeGenOpenCL/fpaccuracy.cl) | 6 | 
2 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index a7f5c47bbca..e0bf9768abe 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -3174,8 +3174,7 @@ void CodeGenFunction::SetFPAccuracy(llvm::Value *Val, float Accuracy) {    llvm::Value *ULPs = llvm::ConstantFP::get(Builder.getFloatTy(), Accuracy);    llvm::MDNode *Node = llvm::MDNode::get(getLLVMContext(), ULPs); -  cast<llvm::Instruction>(Val)->setMetadata(llvm::LLVMContext::MD_fpaccuracy, -                                            Node); +  cast<llvm::Instruction>(Val)->setMetadata(llvm::LLVMContext::MD_fpmath, Node);  }  namespace { diff --git a/clang/test/CodeGenOpenCL/fpaccuracy.cl b/clang/test/CodeGenOpenCL/fpmath.cl index d27316a799f..704fcd739ac 100644 --- a/clang/test/CodeGenOpenCL/fpaccuracy.cl +++ b/clang/test/CodeGenOpenCL/fpmath.cl @@ -4,13 +4,13 @@ typedef __attribute__(( ext_vector_type(4) )) float float4;  float spscalardiv(float a, float b) {    // CHECK: @spscalardiv -  // CHECK: fdiv{{.*}}, !fpaccuracy ![[MD:[0-9]+]] +  // CHECK: fdiv{{.*}}, !fpmath ![[MD:[0-9]+]]    return a / b;  }  float4 spvectordiv(float4 a, float4 b) {    // CHECK: @spvectordiv -  // CHECK: fdiv{{.*}}, !fpaccuracy ![[MD]] +  // CHECK: fdiv{{.*}}, !fpmath ![[MD]]    return a / b;  } @@ -18,7 +18,7 @@ float4 spvectordiv(float4 a, float4 b) {  double dpscalardiv(double a, double b) {    // CHECK: @dpscalardiv -  // CHECK-NOT: !fpaccuracy +  // CHECK-NOT: !fpmath    return a / b;  }  | 

