TomTan added a comment. Thanks for finding out and fixing this. Seems there is also issue in expanding `_WriteStatusReg` in `CodeGenFunction::EmitAArch64BuiltinExpr`. The last argument for `_WriteStatusReg` is __zero extended__ to `__in64`, which is not expected (see below link).
https://github.com/llvm-mirror/clang/blob/8070ca12f87e66f76db528c107e9d291f4a91498/lib/CodeGen/CGBuiltin.cpp#L7100 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57636/new/ https://reviews.llvm.org/D57636 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits