Stream: cranelift

Topic: ifcmp + brif sequence causing verifier error


view this post on Zulip Mitja Karhusaari (Aug 21 2020 at 00:57):

Hi, I hope this is the right place to ask this question. I have the following code:

let flags = builder.ins().ifcmp_imm(virtual_address, *address as i64);
builder.ins().brif(IntCC::Equal, flags, case_block, &[]);

Afaik, this should work, but I get Verifier errors: inst0: v1 is a real FLAG value defined by a ghost instruction, where inst0 is ifcmp_imm and v1 is flags (I think). How should I debug this, is there a way to print out the IR before verification?

view this post on Zulip bjorn3 (Aug 21 2020 at 05:34):

If you have env-logger setup you can use RUST_LOG=trace to log the clif ir to compile.

view this post on Zulip Notification Bot (Aug 21 2020 at 10:15):

This topic was moved here from #general > ifcmp + brif sequence causing verifier error by Till Schneidereit

view this post on Zulip Till Schneidereit (Aug 21 2020 at 10:17):

Hi @Mitja Karhusaari, I moved this topic to the Cranelift stream to make sure it gets visibility for the right set of people :smile:


Last updated: Nov 26 2024 at 00:12 UTC