Add opt with ctlz and shifts of power of 2 constants (#74175)
This patch does the following simplifications: ``` cttz(shl(C, X), 1) -> add(cttz(C, 1), X) cttz(lshr exact(C, X), 1) -> sub(cttz(C, 1), X) ctlz(lshr(C, X), 1) --> add(ctlz(C, 1), X) ctlz(shl nuw (C, X), 1) --> sub(ctlz(C, 1), X) ``` Alive2: https://alive2.llvm.org/ce/z/9KHlKc Closes #41333
parent
28a78e2a
Please register or sign in to comment