Added zext flag named was_sext in IR
RISCVCodeGenPrepare does a conversion that converts all the
zext instructions with the flag back to sext.
Details
Details
- Reviewers
craig.topper
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Need tests and real patch title.
llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp | ||
---|---|---|
89 | "an non" -> "a non" |
Comment Actions
Also upload patches with context per https://llvm.org/docs/DeveloperPolicy.html#making-and-submitting-a-patch
Comment Actions
Should still keep [RISCV] at the beginning of the title. Those tags are helpful for filtering emails from llvm-commits.
Comment Actions
Fixed the test that failed to convert the zext(value) to sext(value) whenever the value was assumed to be non negative by llvm.assume
llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp | ||
---|---|---|
88 | Could we have InstCombine call isKnownNonNegative during visitZExt and set the flag if the input is non negative? Then we only need the code here that checks the flag. |
Could we have InstCombine call isKnownNonNegative during visitZExt and set the flag if the input is non negative? Then we only need the code here that checks the flag.