[clang] [CIR][X86] Implement lowering for sqrt builtins (PR #169310)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 24 14:56:15 PST 2025


================
@@ -716,7 +716,19 @@ mlir::Value CIRGenFunction::emitX86BuiltinExpr(unsigned builtinID,
   case X86::BI__builtin_ia32_sqrtpd256:
   case X86::BI__builtin_ia32_sqrtpd:
   case X86::BI__builtin_ia32_sqrtps256:
-  case X86::BI__builtin_ia32_sqrtps:
+  case X86::BI__builtin_ia32_sqrtps: {
+    auto loc = getLoc(E->getExprLoc());
----------------
andykaylor wrote:

```suggestion
    mlir::Location loc = getLoc(E->getExprLoc());
```
Upstream standards for use of `auto` are conservative.

https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable

https://github.com/llvm/llvm-project/pull/169310


More information about the cfe-commits mailing list