[PATCH] D14587: [WebAssembly] Fix printing of global operands

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 11 17:46:18 PST 2015


sunfish requested changes to this revision.
sunfish added a comment.
This revision now requires changes to proceed.

Actually, I believe there's a better way to fix this. X86 uses this, for example:

def : Pat<(i32 (X86Wrapper tglobaladdr :$dst)), (MOV32ri tglobaladdr :$dst)>;

We should be able to replace our GLOBAL instruction with essentially the same thing (our version of MOV32ri is just Const_I32). This will use i32.const instructions right from the start, so they should then go down the normal path in the assembly printer.


http://reviews.llvm.org/D14587





More information about the llvm-commits mailing list