[InstCombine][msp430] Pre-commit test case for @llvm.powi and 16-bit ints
This is a pre-commit of a test case D99439 which is a patch that updates @llvm.powi to handle different int sizes for the exponent. Problem is that @llvm.powi is used as an IR construct that maps to RT libcalls to __powi* functions, and those lib functions depend on sizeof(int) to use correct type for the exponent. The test cases show that we use i32 for the powi expenent, which later would result in wrong type being used in libcalls (miscompile). But there are also a couple of the negative test cases that show that we rewrite into using powi when having a uitofp conversion from i16, which would be wrong when doing the libcall as an "unsigned int" isn't guaranteed to fit inside the "int" argument in the called libcall function. Differential Revision: https://reviews.llvm.org/D102919
Loading
Please register or sign in to comment