tbaeder added inline comments.

================
Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:16-19
+  auto Arg = S.Stk.pop<Integral<32, false>>();
+  auto Result = Arg.countLeadingZeros();
+  S.Stk.push<Integral<32, true>>(Integral<32, true>::from(Result));
+  return true;
----------------
This would also work as:

```
  auto Arg = S.Stk.pop<unsigned int>();
  auto Result = __builtin_clz(Arg);
  S.Stk.push<int>(Result);
  return true;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134958/new/

https://reviews.llvm.org/D134958

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to