-
Notifications
You must be signed in to change notification settings - Fork 420
Open
Labels
Description
The shift-left folder will do modular shift left, respecting the size of the underlying ap-int, but since we're working with big integers, I'd expect it to grow instead.
Demo of the issue, 4 << 4 ==> 0
firrtl.circuit "Casts" {
firrtl.module @Casts() {}
firrtl.class @PropertyArithmetic(out %o1: !firrtl.integer) {
%0 = firrtl.integer 4
%1 = firrtl.integer.shl %0, %0 : (!firrtl.integer, !firrtl.integer) -> !firrtl.integer
firrtl.propassign %o1, %1 : !firrtl.integer
}
}
// ./bin/circt-opt -canonicalize='top-down=true region-simplify=aggressive' ../scratch/scratch.mlir --mlir-print-ir-before-all
module {
firrtl.circuit "Casts" {
firrtl.module @Casts() {
}
firrtl.class @PropertyArithmetic(out %o1: !firrtl.integer) {
%0 = firrtl.integer 0
firrtl.propassign %o1, %0 : !firrtl.integer
}
}
}Reactions are currently unavailable