mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
Remove over-general comparisons
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33147 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa30182eb8
commit
720922fe27
@ -1823,14 +1823,16 @@ public:
|
|||||||
assert(ArgType->getTypeID() == Type::IntegerTyID &&
|
assert(ArgType->getTypeID() == Type::IntegerTyID &&
|
||||||
"llvm.cttz argument is not an integer?");
|
"llvm.cttz argument is not an integer?");
|
||||||
unsigned BitWidth = cast<IntegerType>(ArgType)->getBitWidth();
|
unsigned BitWidth = cast<IntegerType>(ArgType)->getBitWidth();
|
||||||
if (BitWidth <= 8)
|
if (BitWidth == 8)
|
||||||
CTTZName = "llvm.cttz.i8";
|
CTTZName = "llvm.cttz.i8";
|
||||||
else if (BitWidth <= 16)
|
else if (BitWidth == 16)
|
||||||
CTTZName = "llvm.cttz.i16";
|
CTTZName = "llvm.cttz.i16";
|
||||||
else if (BitWidth <= 32)
|
else if (BitWidth == 32)
|
||||||
CTTZName = "llvm.cttz.i32";
|
CTTZName = "llvm.cttz.i32";
|
||||||
else
|
else {
|
||||||
|
assert(BitWidth == 64 && "Unknown bitwidth");
|
||||||
CTTZName = "llvm.cttz.i64";
|
CTTZName = "llvm.cttz.i64";
|
||||||
|
}
|
||||||
|
|
||||||
Constant *F = SLC.getModule()->getOrInsertFunction(CTTZName, ArgType,
|
Constant *F = SLC.getModule()->getOrInsertFunction(CTTZName, ArgType,
|
||||||
ArgType, NULL);
|
ArgType, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user