craig.topper added inline comments.
================ Comment at: lib/CodeGen/CGBuiltin.cpp:8904 + unsigned CC = cast<llvm::ConstantInt>(Ops[4])->getZExtValue(); + // Support only if the rounding mode is 4 (AKA CUR_DIRECTION), otherwise keep the intrinsic. + if (CC != 4) { ---------------- 80 columns? ================ Comment at: lib/CodeGen/CGBuiltin.cpp:8907 + return nullptr; + } + llvm::Value *C0 = llvm::ConstantInt::get(SizeTy, 0); ---------------- Drop the curly braces ================ Comment at: lib/CodeGen/CGBuiltin.cpp:8909 + llvm::Value *C0 = llvm::ConstantInt::get(SizeTy, 0); + Value *A = Builder.CreateExtractElement(Ops[0], C0, "extract"); + Function *F = CGM.getIntrinsic(Intrinsic::sqrt, A->getType()); ---------------- There's a signature for CreateExtractElement that takes a uint64_t for the index. No need to create a ConstantInt explicitly ================ Comment at: lib/CodeGen/CGBuiltin.cpp:8930 + // Support only if the rounding mode is 4 (AKA CUR_DIRECTION), otherwise keep the intrinsic. + if (CC != 4) { + return nullptr; ---------------- Drop the curly braces Repository: rC Clang https://reviews.llvm.org/D41168 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits