Fixing CountLeadingZeros constant prop.

This commit is contained in:
Ben Vanik 2015-05-12 18:51:01 -07:00
parent acfb5b5722
commit 48ae4b65fb
1 changed files with 4 additions and 4 deletions

View File

@ -609,16 +609,16 @@ void Value::ByteSwap() {
void Value::CountLeadingZeros(const Value* other) { void Value::CountLeadingZeros(const Value* other) {
switch (other->type) { switch (other->type) {
case INT8_TYPE: case INT8_TYPE:
constant.i8 = xe::lzcnt(constant.i8); constant.i8 = xe::lzcnt(other->constant.i8);
break; break;
case INT16_TYPE: case INT16_TYPE:
constant.i8 = xe::lzcnt(constant.i16); constant.i8 = xe::lzcnt(other->constant.i16);
break; break;
case INT32_TYPE: case INT32_TYPE:
constant.i8 = xe::lzcnt(constant.i32); constant.i8 = xe::lzcnt(other->constant.i32);
break; break;
case INT64_TYPE: case INT64_TYPE:
constant.i8 = xe::lzcnt(constant.i64); constant.i8 = xe::lzcnt(other->constant.i64);
break; break;
default: default:
assert_unhandled_case(type); assert_unhandled_case(type);