mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-17 18:24:34 +00:00
Improve ISD::Constant codegen.
Now for int foo() { return -1; } we generate: _foo: li r3, -1 blr instead of _foo: lis r2, -1 ori r3, r2, 65535 blr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1736,7 +1736,7 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) {
|
||||
assert(N.getValueType() == MVT::i32 &&
|
||||
"Only i32 constants are legal on this target!");
|
||||
int v = (int)cast<ConstantSDNode>(N)->getValue();
|
||||
unsigned Hi = Hi16(v);
|
||||
unsigned Hi = HA16(v);
|
||||
unsigned Lo = Lo16(v);
|
||||
if (Hi && Lo) {
|
||||
Tmp1 = MakeIntReg();
|
||||
|
Reference in New Issue
Block a user