It is possible that we have different constants in different slots of a vector double (float).
So, in this case Exp->getSplatValue() will return nullptr.
Here, I am proposing to handle it properly.
Details
- Reviewers
nemanjai Whitney steven.zhang - Group Reviewers
Restricted Project - Commits
- rGb86a1cd2f854: [PowerPC] dyn_cast should be dyn_cast_or_null in MASSV pass
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp | ||
---|---|---|
108 | It seems that some of the test change is not relative with this.(i.e. rename the func name) And the only test change I can imagine is that, some case that we hit ice before now it is passed. That is, if Exp->getSplatValue() return null, dyn_cast will hit ice before. But I didn't see such kind of test. |
llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp | ||
---|---|---|
108 | I agree the rename the func name in the test is irrelevant to this change but the one with @__powd2_massv(<2 x double> %wide.load, <2 x double> <double 7.700000e-01, double 7.600000e-01>) and similar ones that tests the two slots of the second vector double has non-equal constants are relevant. For example in this test Exp->getSplatValue() returns nullptr which is handled here. | |
llvm/test/CodeGen/PowerPC/pow_massv_075_025exp.ll | ||
74 | Two slots of the second vector double in __powd2_massv arguments has non-equal constants. | |
100 | Two slots of the second vector double in __powd2_massv arguments has non-equal constants. | |
126 | Two slots of the second vector double in __powd2_massv arguments has non-equal constants. | |
llvm/test/CodeGen/PowerPC/powf_massv_075_025exp.ll | ||
74 | Four slots of the second vector float in __powf4_massv arguments has non-equal constants. | |
100 | Four slots of the second vector float in __powf4_massv arguments has non-equal constants. | |
126 | Four slots of the second vector float in __powf4_massv arguments has non-equal constants. |
LGTM as I indeed see the crash fixed.
llvm/test/CodeGen/PowerPC/powf_massv_075_025exp.ll | ||
---|---|---|
74 | Usually, we will add some comments in the test to indicate that no crash any more. |
It seems that some of the test change is not relative with this.(i.e. rename the func name) And the only test change I can imagine is that, some case that we hit ice before now it is passed. That is, if Exp->getSplatValue() return null, dyn_cast will hit ice before. But I didn't see such kind of test.