[PATCH] [AsmPrinter] handles addrspacecast in lowerConstant

Jingyue Wu jingyue at google.com
Fri Apr 17 10:26:59 PDT 2015


This issue turns out more difficult to fix than I expected. With the test case in my patch, LLVM runs into NVPTXAsmPrinter.h:163 <http://llvm.org/docs/doxygen/html/NVPTXAsmPrinter_8h_source.html#l00163> and prints out an `MCExpr` that represents a GEP of an addrspacecast (`i32* getelementptr (i32, i32* addrspacecast (i32 addrspace(1)* @g to i32*), i32 2)`). Even if we fix `lowerConstant` to translate `addrspacecast` into an `MCUnaryExpr`, printing an `MCExpr` is not customized yet so we are still unable to print the `MCUnaryExpr` with `generic(`.

Can we customize the printing of `MCExpr`?


http://reviews.llvm.org/D9063

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list