[PATCH] D24702: AArch64: Set shift bit of TLSLE HI12 add instruction

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 06:59:42 PDT 2016


rovka added inline comments.

================
Comment at: lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp:268
@@ +267,3 @@
+  // R_AARCH64_TLSLE_ADD_TPREL_HI12 and R_AARCH64_TLSLD_ADD_DTPREL_HI12.
+  if (Expr->getKind() == MCExpr::Target) {
+    AArch64MCExpr::VariantKind RefKind = cast<AArch64MCExpr>(Expr)->getKind();
----------------
I think the intent would be clearer if you folded this check and the cast below into a dyn_cast (http://llvm.org/docs/ProgrammersManual.html#isa).


https://reviews.llvm.org/D24702





More information about the llvm-commits mailing list