-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
Labels
bugSomething isn't workingSomething isn't workingcompilerGeneral compiler. Should eventually become more specific as the issue is triagedGeneral compiler. Should eventually become more specific as the issue is triagedcompiler: irIRgen and sway-ir including optimization passesIRgen and sway-ir including optimization passes
Description
__smo and __log intrinsics return unit () but the returned value is not correctly compiled in the IR. Instead of having a const () as their return value they just return their underlaying IR instruction that does not return a value.
E.g. compiling the following script producess ICEs:
script;
fn main() {
poke(__smo(b256::zero(), 0u64, 0));
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Internal compiler error: An attempt to get register for unknown Value.
poke(__log(0u64));
// Internal compiler error: An attempt to get register for unknown Value.
}
#[inline(never)]
fn poke<T>(_x: T) {}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompilerGeneral compiler. Should eventually become more specific as the issue is triagedGeneral compiler. Should eventually become more specific as the issue is triagedcompiler: irIRgen and sway-ir including optimization passesIRgen and sway-ir including optimization passes